From 21e186f75b504d832d9c7bef0456edd7d5d3155e Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 8 Sep 2021 10:52:35 +0800 Subject: +behavior design --- .../Boxophobic.AtmosphericHeightFog.Editor.asmdef | 18 --- ...ophobic.AtmosphericHeightFog.Editor.asmdef.meta | 7 - .../Core/Editor/HeightFogCreate.cs | 111 --------------- .../Core/Editor/HeightFogCreate.cs.meta | 13 -- .../Core/Editor/HeightFogGlobalInspector.cs | 46 ------ .../Core/Editor/HeightFogGlobalInspector.cs.meta | 11 -- .../Core/Editor/HeightFogHub.cs | 158 --------------------- .../Core/Editor/HeightFogHub.cs.meta | 12 -- .../Core/Editor/HeightFogOverrideInspector.cs | 45 ------ .../Core/Editor/HeightFogOverrideInspector.cs.meta | 11 -- .../Core/Editor/HeightFogShaderGUI.cs | 61 -------- .../Core/Editor/HeightFogShaderGUI.cs.meta | 11 -- .../Core/Editor/HeightFogWindows.cs | 41 ------ .../Core/Editor/HeightFogWindows.cs.meta | 11 -- .../Core/Editor/Version.asset | 15 -- .../Core/Editor/Version.asset.meta | 8 -- 16 files changed, 579 deletions(-) delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef.meta delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs.meta delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs.meta delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs.meta delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs.meta delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs.meta delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs.meta delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset delete mode 100644 Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset.meta (limited to 'Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor') diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef deleted file mode 100644 index ce3bc90c..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Boxophobic.AtmosphericHeightFog.Editor", - "references": [ - "Boxophobic.Utils.Editor", - "Boxophobic.Utils.Scripts", - "Boxophobic.AtmosphericHeightFog.Runtime" - ], - "optionalUnityReferences": [], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [] -} \ No newline at end of file diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef.meta deleted file mode 100644 index 58c4c7ea..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Boxophobic.AtmosphericHeightFog.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 154764cb075aa0b4eb8b88ba5ca2617f -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: 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()); - } - } -} - diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs.meta deleted file mode 100644 index 5fd3fa0f..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogCreate.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 272a11163456c6647affb81b9e5f31a4 -timeCreated: 1573480983 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs deleted file mode 100644 index 65ff14aa..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Cristian Pop - https://boxophobic.com/ - -using UnityEditor; - -namespace AtmosphericHeightFog -{ - [CanEditMultipleObjects] - [CustomEditor(typeof(HeightFogGlobal))] - public class HeightFogGlobalInspector : Editor - { - readonly string[] scriptMode = { "m_Script", "presetMaterial", "presetDay", "presetNight", "timeOfDay" }; - readonly string[] presetMode = { "m_Script", "presetDay", "presetNight", "timeOfDay", "categoryFog", "fogIntensity", "fogAxisMode", "fogLayersMode", "fogColorStart", "fogColorEnd", "fogColorDuo", "fogDistanceStart", "fogDistanceEnd", "fogDistanceFalloff", "fogHeightStart", "fogHeightEnd", "fogHeightFalloff", "categorySkybox", "skyboxFogIntensity", "skyboxFogHeight", "skyboxFogFalloff", "skyboxFogFill", "categoryDirectional", "directionalIntensity", "directionalFalloff", "directionalColor", "categoryNoise", "noiseMode", "noiseIntensity", "noiseDistanceEnd", "noiseScale", "noiseSpeed" }; - readonly string[] timeOfDayMode = { "m_Script", "presetMaterial", "categoryFog", "fogIntensity", "fogAxisMode", "fogLayersMode", "fogColorStart", "fogColorEnd", "fogColorDuo", "fogDistanceStart", "fogDistanceEnd", "fogDistanceFalloff", "fogHeightStart", "fogHeightEnd", "fogHeightFalloff", "categorySkybox", "skyboxFogIntensity", "skyboxFogHeight", "skyboxFogFalloff", "skyboxFogFill", "categoryDirectional", "directionalIntensity", "directionalFalloff", "directionalColor", "categoryNoise", "noiseMode", "noiseIntensity", "noiseDistanceEnd", "noiseScale", "noiseSpeed" }; - HeightFogGlobal targetScript; - - void OnEnable() - { - targetScript = (HeightFogGlobal)target; - } - - public override void OnInspectorGUI() - { - DrawInspector(); - } - - void DrawInspector() - { - string[] exclude = scriptMode; - - if (targetScript.fogMode == FogMode.UsePresetSettings) - { - exclude = presetMode; - } - else if (targetScript.fogMode == FogMode.UseTimeOfDay) - { - exclude = timeOfDayMode; - } - - serializedObject.Update(); - - DrawPropertiesExcluding(serializedObject, exclude); - - serializedObject.ApplyModifiedProperties(); - } - } -} diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs.meta deleted file mode 100644 index 9dee906a..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogGlobalInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5742a0fb70ce25846bc3269f9cdcf0cc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs deleted file mode 100644 index 624b8446..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Cristian Pop - https://boxophobic.com/ - -using UnityEngine; -using UnityEditor; -using Boxophobic.StyledGUI; -using Boxophobic.Utils; -using System.IO; - -namespace AtmosphericHeightFog -{ - public class HeightFogHub : EditorWindow - { -#if UNITY_2019_3_OR_NEWER - const int GUI_HEIGHT = 18; -#else - const int GUI_HEIGHT = 14; -#endif - - string folderAsset = "Assets/BOXOPHOBIC/Atmospheric Height Fog"; - - string[] pipelinePaths; - string[] pipelineOptions; - string pipelinesPath; - int pipelineIndex; - - int assetVersion; - string bannerVersion; - - GUIStyle stylePopup; - - Color bannerColor; - string bannerText; - string helpURL; - static HeightFogHub window; - //Vector2 scrollPosition = Vector2.zero; - - [MenuItem("Window/BOXOPHOBIC/Atmospheric Height Fog/Hub", false, 1000)] - public static void ShowWindow() - { - window = GetWindow(false, "Atmospheric Height Fog", true); - window.minSize = new Vector2(389, 220); - } - - void OnEnable() - { - bannerColor = new Color(0.55f, 0.7f, 1f); - bannerText = "Atmospheric Height Fog"; - helpURL = "https://docs.google.com/document/d/1pIzIHIZ-cSh2ykODSZCbAPtScJ4Jpuu7lS3rNEHCLbc/edit#heading=h.hbq3w8ae720x"; - - //Safer search, there might be many user folders - string[] searchFolders; - - searchFolders = AssetDatabase.FindAssets("Atmospheric Height Fog"); - - for (int i = 0; i < searchFolders.Length; i++) - { - if (AssetDatabase.GUIDToAssetPath(searchFolders[i]).EndsWith("Atmospheric Height Fog.pdf")) - { - folderAsset = AssetDatabase.GUIDToAssetPath(searchFolders[i]); - folderAsset = folderAsset.Replace("/Atmospheric Height Fog.pdf", ""); - } - } - - pipelinesPath = folderAsset + "/Core/Pipelines"; - - GetPackages(); - - assetVersion = SettingsUtils.LoadSettingsData(folderAsset + "/Core/Editor/Version.asset", -99); - bannerVersion = assetVersion.ToString(); - bannerVersion = bannerVersion.Insert(1, "."); - bannerVersion = bannerVersion.Insert(3, "."); - - bannerColor = new Color(0.55f, 0.7f, 1f); - bannerText = "Atmospheric Height Fog " + bannerVersion; - } - - void OnGUI() - { - SetGUIStyles(); - - StyledGUI.DrawWindowBanner(bannerColor, bannerText, helpURL); - - GUILayout.BeginHorizontal(); - GUILayout.Space(20); - - GUILayout.BeginVertical(); - - //scrollPosition = GUILayout.BeginScrollView(scrollPosition, false, false, GUILayout.Width(this.position.width - 28), GUILayout.Height(this.position.height - 80)); - - EditorGUILayout.HelpBox("Click the Import Render Pipeline to switch to another render pipeline. For Universal Render Pipeline, follow the instructions below to enable the fog rendering!", MessageType.Info, true); - - if (pipelineOptions[pipelineIndex].Contains("Universal 7.1.8")) - { - EditorGUILayout.HelpBox("For Universal 7.1.8+ Pipeline, Depth Texture and one of the following features need to be enabled for the depth to work properly: Opaque Texure, HDR or Post Processing!", MessageType.Info, true); - } - - if (pipelineOptions[pipelineIndex].Contains("Universal 7.4.1")) - { - EditorGUILayout.HelpBox("For Universal 7.4.1+ Pipeline, Depth Texture need to be enabled on the render pipeline asset!", MessageType.Info, true); - } - - DrawInterface(); - - //GUILayout.EndScrollView(); - - GUILayout.EndVertical(); - - GUILayout.Space(13); - GUILayout.EndHorizontal(); - } - - void SetGUIStyles() - { - stylePopup = new GUIStyle(EditorStyles.popup) - { - alignment = TextAnchor.MiddleCenter - }; - } - - void DrawInterface() - { - GUILayout.Space(10); - - GUILayout.BeginHorizontal(); - EditorGUILayout.LabelField(new GUIContent("Render Pipeline", ""), GUILayout.Width(220)); - pipelineIndex = EditorGUILayout.Popup(pipelineIndex, pipelineOptions, stylePopup); - if (GUILayout.Button("Import", GUILayout.Width(80), GUILayout.Height(GUI_HEIGHT))) - { - ImportPackage(); - - GUIUtility.ExitGUI(); - } - GUILayout.EndHorizontal(); - } - - void GetPackages() - { - pipelinePaths = Directory.GetFiles(pipelinesPath, "*.unitypackage", SearchOption.TopDirectoryOnly); - - pipelineOptions = new string[pipelinePaths.Length]; - - for (int i = 0; i < pipelineOptions.Length; i++) - { - pipelineOptions[i] = Path.GetFileNameWithoutExtension(pipelinePaths[i].Replace("Built-in Pipeline", "Standard")); - } - } - - void ImportPackage() - { - AssetDatabase.ImportPackage(pipelinePaths[pipelineIndex], true); - AssetDatabase.SaveAssets(); - AssetDatabase.Refresh(); - - Debug.Log("[Atmospheric Height Fog] " + pipelineOptions[pipelineIndex] + " package imported in your project!"); - } - } -} - diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs.meta deleted file mode 100644 index 6a7dc147..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogHub.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 094779c9d6df2bd478d3045d5a486647 -timeCreated: 1538943308 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs deleted file mode 100644 index 3de6f79a..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs +++ /dev/null @@ -1,45 +0,0 @@ - -using UnityEditor; - -namespace AtmosphericHeightFog -{ - [CanEditMultipleObjects] - [CustomEditor(typeof(HeightFogOverride))] - public class HeightFogOverrideInspector : Editor - { - readonly string[] scriptMode = { "m_Script", "presetMaterial", "presetDay", "presetNight", "timeOfDay" }; - readonly string[] presetMode = { "m_Script", "presetDay", "presetNight", "timeOfDay", "categoryFog", "fogIntensity", "fogAxisMode", "fogLayersMode", "fogColorStart", "fogColorEnd", "fogColorDuo", "fogDistanceStart", "fogDistanceEnd", "fogDistanceFalloff", "fogHeightStart", "fogHeightEnd", "fogHeightFalloff", "categorySkybox", "skyboxFogIntensity", "skyboxFogHeight", "skyboxFogFalloff", "skyboxFogFill", "categoryDirectional", "directionalIntensity", "directionalFalloff", "directionalColor", "categoryNoise", "noiseMode", "noiseIntensity", "noiseDistanceEnd", "noiseScale", "noiseSpeed" }; - readonly string[] timeOfDayMode = { "m_Script", "presetMaterial", "categoryFog", "fogIntensity", "fogAxisMode", "fogLayersMode", "fogColorStart", "fogColorEnd", "fogColorDuo", "fogDistanceStart", "fogDistanceEnd", "fogDistanceFalloff", "fogHeightStart", "fogHeightEnd", "fogHeightFalloff", "categorySkybox", "skyboxFogIntensity", "skyboxFogHeight", "skyboxFogFalloff", "skyboxFogFill", "categoryDirectional", "directionalIntensity", "directionalFalloff", "directionalColor", "categoryNoise", "noiseMode", "noiseIntensity", "noiseDistanceEnd", "noiseScale", "noiseSpeed" }; - HeightFogOverride targetScript; - - void OnEnable() - { - targetScript = (HeightFogOverride)target; - } - - public override void OnInspectorGUI() - { - DrawInspector(); - } - - void DrawInspector() - { - string[] exclude = scriptMode; - - if (targetScript.fogMode == FogMode.UsePresetSettings) - { - exclude = presetMode; - } - else if (targetScript.fogMode == FogMode.UseTimeOfDay) - { - exclude = timeOfDayMode; - } - - serializedObject.Update(); - - DrawPropertiesExcluding(serializedObject, exclude); - - serializedObject.ApplyModifiedProperties(); - } - } -} diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs.meta deleted file mode 100644 index 296414df..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogOverrideInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4fd498d1bc844c447b1f09b2d746282e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs deleted file mode 100644 index 91252ba1..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs +++ /dev/null @@ -1,61 +0,0 @@ -//Cristian Pop - https://boxophobic.com/ - -using UnityEngine; -using UnityEditor; - -public class HeightFogShaderGUI : ShaderGUI -{ - Material material; - - public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) - { - base.OnGUI(materialEditor, props); - - material = materialEditor.target as Material; - - SetBlendProps(); - } - - void SetBlendProps() - { - if (material.HasProperty("_FogAxisMode")) - { - if (material.GetInt("_FogAxisMode") == 0) - { - material.SetVector("_FogAxisOption", new Vector4(1, 0, 0, 0)); - } - else if (material.GetInt("_FogAxisMode") == 1) - { - material.SetVector("_FogAxisOption", new Vector4(0, 1, 0, 0)); - } - else if (material.GetInt("_FogAxisMode") == 2) - { - material.SetVector("_FogAxisOption", new Vector4(0, 0, 1, 0)); - } - } - - if (material.HasProperty("_DirectionalMode")) - { - if (material.GetInt("_DirectionalMode") == 0) - { - material.SetFloat("_DirectionalModeBlend", 0.0f); - } - else if (material.GetInt("_DirectionalMode") == 1) - { - material.SetFloat("_DirectionalModeBlend", 1.0f); - } - } - - if (material.HasProperty("_NoiseMode")) - { - if (material.GetInt("_NoiseMode") == 0) - { - material.SetFloat("_NoiseModeBlend", 0.0f); - } - else if (material.GetInt("_NoiseMode") == 2) - { - material.SetFloat("_NoiseModeBlend", 1.0f); - } - } - } -} diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs.meta deleted file mode 100644 index cd445575..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogShaderGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fefeae948a42a964faad5fe6c75c59de -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs deleted file mode 100644 index bb6b0e2b..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEditor; -using UnityEngine; - -namespace AtmosphericHeightFog -{ - public static class HeightFogWindows - { - - [MenuItem("Window/BOXOPHOBIC/Atmospheric Height Fog/Publisher Page", false, 2000)] - public static void MoreAssets() - { - Application.OpenURL("https://assetstore.unity.com/publishers/20529"); - } - - [MenuItem("Window/BOXOPHOBIC/Atmospheric Height Fog/Discord Server", false, 2001)] - public static void Discord() - { - Application.OpenURL("https://discord.com/invite/znxuXET"); - } - - [MenuItem("Window/BOXOPHOBIC/Atmospheric Height Fog/Documentation", false, 2002)] - public static void Documentation() - { - Application.OpenURL("https://docs.google.com/document/d/1pIzIHIZ-cSh2ykODSZCbAPtScJ4Jpuu7lS3rNEHCLbc/edit#"); - } - - [MenuItem("Window/BOXOPHOBIC/Atmospheric Height Fog/Changelog", false, 2003)] - public static void Chnagelog() - { - Application.OpenURL("https://docs.google.com/document/d/1pIzIHIZ-cSh2ykODSZCbAPtScJ4Jpuu7lS3rNEHCLbc/edit#heading=h.1rbujejuzjce"); - } - - [MenuItem("Window/BOXOPHOBIC/Atmospheric Height Fog/Write A Review", false, 3001)] - public static void WriteAReview() - { - Application.OpenURL("https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/atmospheric-height-fog-optimized-fog-shaders-for-consoles-mobile-143825#reviews"); - } - } -} - - diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs.meta deleted file mode 100644 index 48557f75..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/HeightFogWindows.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5fcdedd08e41e034790d1fa393bcb67e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset deleted file mode 100644 index d45e51c2..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset +++ /dev/null @@ -1,15 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 93308045fbb3c5e42ba5ccb66d848632, type: 3} - m_Name: Version - m_EditorClassIdentifier: - data: 181 diff --git a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset.meta b/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset.meta deleted file mode 100644 index ccb072a9..00000000 --- a/Assets/BOXOPHOBIC/Atmospheric Height Fog/Core/Editor/Version.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 41b457a34c9fb7f45a332c79a90945b5 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: -- cgit v1.1-26-g67d0