Example #1
0
        private void OnEnable()
        {
            var targetSystem = target as TileSystem;

            // Mark active target as the active tile system?
            //  - Must be part of current user selection!
            //  - Must not reside within an asset.
            if (Selection.activeGameObject == targetSystem.gameObject && Selection.instanceIDs.Length == 1)
            {
                if (!EditorUtility.IsPersistent(this.target) && ToolUtility.ActiveTileSystem != targetSystem)
                {
                    ToolUtility.ActiveTileSystem = targetSystem;

                    // Hide selected wireframe if tool is active.
                    if (ToolManager.Instance.CurrentTool != null)
                    {
                        ToolUtility.HideSelectedWireframe(targetSystem);
                    }
                }
            }
        }
 /// <summary>
 /// Begin editing mode since tool has just been activated.
 /// </summary>
 private void BeginEditMode()
 {
     ToolUtility.HideSelectedWireframe(ToolUtility.ActiveTileSystem);
 }