void Start() { pointToMoveParticle = movePointParticle.GetComponent <ParticleSystem>();; selected = Units_Selection.selectionInstance; Cursor.SetCursor(mainCursor, Vector2.zero, CursorMode.Auto); }
void Awake() { selectionInstance = this; //Singletone - Can access the script without getting a component value if (canvas == null) { canvas = FindObjectOfType <Canvas>(); } if (selectionBox != null) { //We need to reset anchors and pivot to ensure proper positioning rt = selectionBox.GetComponent <RectTransform>(); rt.pivot = Vector2.one * .5f; rt.anchorMin = Vector2.one * .5f; rt.anchorMax = Vector2.one * .5f; selectionBox.gameObject.SetActive(false); } }
private void Awake() { selected = Units_Selection.selectionInstance; }