From 21e186f75b504d832d9c7bef0456edd7d5d3155e Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 8 Sep 2021 10:52:35 +0800 Subject: +behavior design --- .../Core/Editor/HeightFogCreate.cs | 111 --------------------- 1 file changed, 111 deletions(-) delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs (limited to 'Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs') diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs deleted file mode 100644 index bc273fca..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Cristian Pop - https://boxophobic.com/ - -using UnityEditor; -using UnityEditor.SceneManagement; -using UnityEngine; - -namespace AtmosphericHeightFog -{ - public class HeightFogCreate - { - [MenuItem("GameObject/BOXOPHOBIC/Atmospheric Height Fog/Global", false, 9)] - static void CreateGlobalVolume() - { - if (GameObject.Find("Height Fog Global") != null) - { - Debug.Log("[Atmospheric Height Fog] " + "Height Fog Global is already added to your scene!"); - return; - } - - GameObject go = new GameObject(); - go.name = "Height Fog Global"; - go.AddComponent(); - - if (Selection.activeGameObject != null) - { - go.transform.parent = Selection.activeGameObject.transform; - } - - Selection.activeGameObject = go; - - EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); - } - - [MenuItem("GameObject/BOXOPHOBIC/Atmospheric Height Fog/Override Volume (Box)", false, 10)] - static void CreateOverrideBoxVolume() - { - if (GameObject.Find("Height Fog Global") == null) - { - Debug.Log("[Atmospheric Height Fog] " + "Height Fog Global must be added to the scene first!"); - return; - } - - GameObject go = new GameObject(); - go.name = "Height Fog Override (Box)"; - go.AddComponent(); - go.GetComponent().isTrigger = true; - go.AddComponent(); - - var sceneCamera = SceneView.lastActiveSceneView.camera; - - if (sceneCamera != null) - { - go.transform.position = sceneCamera.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, 10f)); - } - else - { - go.transform.localPosition = Vector3.zero; - go.transform.localEulerAngles = Vector3.zero; - go.transform.localScale = Vector3.one; - } - - if (Selection.activeGameObject != null) - { - go.transform.parent = Selection.activeGameObject.transform; - } - - Selection.activeGameObject = go; - - EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); - } - - [MenuItem("GameObject/BOXOPHOBIC/Atmospheric Height Fog/Override Volume (Sphere)", false, 11)] - static void CreateOverrideSphereVolume() - { - if (GameObject.Find("Height Fog Global") == null) - { - Debug.Log("[Atmospheric Height Fog] " + "Height Fog Global must be added to the scene first!"); - return; - } - - GameObject go = new GameObject(); - go.name = "Height Fog Override (Sphere)"; - go.AddComponent(); - go.GetComponent().isTrigger = true; - go.AddComponent(); - - var sceneCamera = SceneView.lastActiveSceneView.camera; - - if (sceneCamera != null) - { - go.transform.position = sceneCamera.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, 10f)); - } - else - { - go.transform.localPosition = Vector3.zero; - go.transform.localEulerAngles = Vector3.zero; - go.transform.localScale = Vector3.one; - } - - if (Selection.activeGameObject != null) - { - go.transform.parent = Selection.activeGameObject.transform; - } - - Selection.activeGameObject = go; - - EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); - } - } -} - -- cgit v1.1-26-g67d0