//On Start, assign SpriteDatabse class to 'sd'. (Note: That class can never be missing due to the dependency system) //It then runs Debugger() (find it below.) It checks whether the required sprites are assigned in the inspector, etc. //Then, it builds hierarchy for GUI (find below) void Start(){ sd = GetComponent<SpriteDatabase>(); fontSize = Mathf.Clamp(fontSize, 5, 30); Debugger(); BuildHierarchy(); startPos = player.transform.position; }
public void Awake() { sprites = this; }
//On Start, assign SpriteDatabse class to 'sd'. (Note: That class can never be missing due to the dependency system) //It then runs Debugger() (find it below.) It checks whether the required sprites are assigned in the inspector, etc. //Then, it builds hierarchy for GUI (find below) void Start(){ sd = GetComponent<SpriteDatabase>(); // Debugger(); BuildHierarchy(); // startPos = player.transform.position; }
void Awake() { Instance = gameObject.GetComponent<SpriteDatabase>(); }