Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Sirenix.OdinInspector;
- using System.Linq;
- public class GameObjectsFinder : MonoBehaviour
- {
- [ShowInInspector][OnValueChanged("FindObjects")]
- public Dictionary<string,GameObject> objDict = new Dictionary<string, GameObject>();
- void FindObjects(){
- List<string>dKeys = new List<string>(objDict.Keys);
- objDict = dKeys.ToDictionary(key=>key,key=>GameObject.Find(key));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement