void Awake() { var trees = FindObjectsOfType <GreenPandaAssets.Scripts.Other.EnvProp>().ToList(); for (int i = trees.Count - 1; i >= 0; i--) { if (!trees[i].name.Contains("Tree") && !trees[i].name.Contains("Rock") && !trees[i].name.Contains("Grass") && !trees[i].name.Contains("Bush") && !trees[i].name.Contains("Branch")) { trees.Remove(trees[i]); } } Trees = trees.Select(x => x.transform).ToArray(); OriginalScale = new Vector3[Trees.Length]; for (int i = 0; i < Trees.Length; i++) { OriginalScale[i] = Trees[i].localScale; } #if UNITY_EDITOR ServiceLocator.CheckForUniqueness <AnimatePropsService>(gameObject); #endif }
void Awake() { if (AllCheckpoints == null) { FindCheckpoints(); } #if UNITY_EDITOR ServiceLocator.CheckForUniqueness <CheckpointService>(gameObject); #endif }
private void Awake() { ServiceLocator.CheckForUniqueness <VoiceoverService>(gameObject); }
private void Awake() { ServiceLocator.CheckForUniqueness <ControllerService>(gameObject); }