diff --git a/AAC/AACCore/Template.meta b/AAC/Template.meta similarity index 100% rename from AAC/AACCore/Template.meta rename to AAC/Template.meta diff --git a/AAC/AACCore/Template/Template.cs b/AAC/Template/Template.cs similarity index 100% rename from AAC/AACCore/Template/Template.cs rename to AAC/Template/Template.cs diff --git a/AAC/AACCore/Template/Template.cs.meta b/AAC/Template/Template.cs.meta similarity index 100% rename from AAC/AACCore/Template/Template.cs.meta rename to AAC/Template/Template.cs.meta diff --git a/AAC/AACCore/Template/TemplateAAC.asmdef b/AAC/Template/TemplateAAC.asmdef similarity index 100% rename from AAC/AACCore/Template/TemplateAAC.asmdef rename to AAC/Template/TemplateAAC.asmdef diff --git a/AAC/AACCore/Template/TemplateAAC.asmdef.meta b/AAC/Template/TemplateAAC.asmdef.meta similarity index 100% rename from AAC/AACCore/Template/TemplateAAC.asmdef.meta rename to AAC/Template/TemplateAAC.asmdef.meta diff --git a/Common/Runtime/ComponentHelper.cs b/Common/Runtime/ComponentHelper.cs index 2ed7203..5189578 100644 --- a/Common/Runtime/ComponentHelper.cs +++ b/Common/Runtime/ComponentHelper.cs @@ -1,3 +1,4 @@ +using System.Linq; using UnityEngine; namespace gay.lilyy.Common @@ -41,7 +42,7 @@ namespace gay.lilyy.Common { if (root == null) return null; - T[] components = root.GetComponentsInChildren(true); + T[] components = root.GetComponentsInChildren(true).Concat(root.GetComponents()).ToArray(); if (components.Length == 0) { return null; diff --git a/Commonly Used/Skyboxes.meta b/Commonly Used/Skyboxes.meta new file mode 100644 index 0000000..59cf93b --- /dev/null +++ b/Commonly Used/Skyboxes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c6db08a5d1108b74b99df35667df61de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula.meta b/Commonly Used/Skyboxes/Nebula.meta new file mode 100644 index 0000000..b6119e0 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 694596011487a8b4da923fe87bd6109e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/1.mat b/Commonly Used/Skyboxes/Nebula/1.mat new file mode 100644 index 0000000..cede3c2 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/1.mat @@ -0,0 +1,114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 1 + m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrontTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Tex: + m_Texture: {fileID: 8900000, guid: d5ea866618d95f8488785fbb1f3ae860, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Rotation: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Commonly Used/Skyboxes/Nebula/1.mat.meta b/Commonly Used/Skyboxes/Nebula/1.mat.meta new file mode 100644 index 0000000..c46743d --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/1.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 04a5167688e285d43b4767f306a96e2e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/2.mat b/Commonly Used/Skyboxes/Nebula/2.mat new file mode 100644 index 0000000..2424bfa --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/2.mat @@ -0,0 +1,114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2 + m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrontTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Tex: + m_Texture: {fileID: 8900000, guid: db1cc316f827c9144bdd6c923ca9b3c5, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Rotation: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Commonly Used/Skyboxes/Nebula/2.mat.meta b/Commonly Used/Skyboxes/Nebula/2.mat.meta new file mode 100644 index 0000000..15c1ea5 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/2.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 23de3b3b467757d47820d8127a6ec78f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/3.mat b/Commonly Used/Skyboxes/Nebula/3.mat new file mode 100644 index 0000000..74808e1 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/3.mat @@ -0,0 +1,114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 3 + m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrontTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Tex: + m_Texture: {fileID: 8900000, guid: a469fa04e6f3e8945b5e367c00cc358d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Rotation: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Commonly Used/Skyboxes/Nebula/3.mat.meta b/Commonly Used/Skyboxes/Nebula/3.mat.meta new file mode 100644 index 0000000..f1bb943 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/3.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 47fe3fa40de2fd745963a967d8da1d94 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/4.mat b/Commonly Used/Skyboxes/Nebula/4.mat new file mode 100644 index 0000000..6d073ec --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/4.mat @@ -0,0 +1,114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 4 + m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrontTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Tex: + m_Texture: {fileID: 8900000, guid: f2534a0c318d54f4b92555b9e652ad36, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Rotation: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Commonly Used/Skyboxes/Nebula/4.mat.meta b/Commonly Used/Skyboxes/Nebula/4.mat.meta new file mode 100644 index 0000000..1b0e473 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/4.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: abd8e28b1f7d5344f9e2c318b1161f83 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/5.mat b/Commonly Used/Skyboxes/Nebula/5.mat new file mode 100644 index 0000000..de9d3d2 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/5.mat @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 5 + m_Shader: {fileID: 104, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 2800000, guid: b692a498a0379a341872703d288b04af, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 2800000, guid: a3b2b45ab4da8b343ad09a56207d3910, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrontTex: + m_Texture: {fileID: 2800000, guid: a5e005e6ff4298340b2ff009a5991908, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 2800000, guid: 80f1020b68f9b794994187bf41ba9d21, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 2800000, guid: 411c36f0804e8c248a3f6470ca50cd85, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 2800000, guid: 8313f24c5bda59240aabef5e6c46f9a5, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Rotation: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Commonly Used/Skyboxes/Nebula/5.mat.meta b/Commonly Used/Skyboxes/Nebula/5.mat.meta new file mode 100644 index 0000000..53c5d15 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/5.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 81f714daf7144784b8a2f42f1cd30927 +timeCreated: 1497127647 +licenseType: Store +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI.meta b/Commonly Used/Skyboxes/Nebula/HDRI.meta new file mode 100644 index 0000000..803b130 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96e54804d4713aa44b9b32f86b2f6349 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes.meta new file mode 100644 index 0000000..d5cb712 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8bf998f5431ef34980efdf8f0428e6f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_01_Cubemap.exr b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_01_Cubemap.exr new file mode 100644 index 0000000..70afb30 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_01_Cubemap.exr differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_01_Cubemap.exr.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_01_Cubemap.exr.meta new file mode 100644 index 0000000..0895644 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_01_Cubemap.exr.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: d5ea866618d95f8488785fbb1f3ae860 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_02_Cubemap.exr b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_02_Cubemap.exr new file mode 100644 index 0000000..2ba3910 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_02_Cubemap.exr differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_02_Cubemap.exr.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_02_Cubemap.exr.meta new file mode 100644 index 0000000..24a9973 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_02_Cubemap.exr.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: db1cc316f827c9144bdd6c923ca9b3c5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_03_Cubemap.exr b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_03_Cubemap.exr new file mode 100644 index 0000000..2eab566 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_03_Cubemap.exr differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_03_Cubemap.exr.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_03_Cubemap.exr.meta new file mode 100644 index 0000000..b2060e7 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_03_Cubemap.exr.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: a469fa04e6f3e8945b5e367c00cc358d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_04_Cubemap.exr b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_04_Cubemap.exr new file mode 100644 index 0000000..18a0b35 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_04_Cubemap.exr differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_04_Cubemap.exr.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_04_Cubemap.exr.meta new file mode 100644 index 0000000..bfab423 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Nebula Skyboxes/Nebula_04_Cubemap.exr.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: f2534a0c318d54f4b92555b9e652ad36 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield.meta new file mode 100644 index 0000000..7b47cfc --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7a4470ba344bcbb44bb67e3c01170b5c +folderAsset: yes +timeCreated: 1497127516 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Back_Tex.png b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Back_Tex.png new file mode 100644 index 0000000..7fcfa06 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Back_Tex.png differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Back_Tex.png.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Back_Tex.png.meta new file mode 100644 index 0000000..5baaf41 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Back_Tex.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: b692a498a0379a341872703d288b04af +timeCreated: 1497132186 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Down_Tex.png b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Down_Tex.png new file mode 100644 index 0000000..8a5dba0 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Down_Tex.png differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Down_Tex.png.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Down_Tex.png.meta new file mode 100644 index 0000000..700f987 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Down_Tex.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: a3b2b45ab4da8b343ad09a56207d3910 +timeCreated: 1497132182 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Front_Tex.png b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Front_Tex.png new file mode 100644 index 0000000..7d476b9 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Front_Tex.png differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Front_Tex.png.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Front_Tex.png.meta new file mode 100644 index 0000000..2dd8edd --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Front_Tex.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: a5e005e6ff4298340b2ff009a5991908 +timeCreated: 1497132184 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Left_Tex.png b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Left_Tex.png new file mode 100644 index 0000000..6dc28a6 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Left_Tex.png differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Left_Tex.png.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Left_Tex.png.meta new file mode 100644 index 0000000..4aeb556 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Left_Tex.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 80f1020b68f9b794994187bf41ba9d21 +timeCreated: 1497132178 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Right_Tex.png b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Right_Tex.png new file mode 100644 index 0000000..f5b3a27 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Right_Tex.png differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Right_Tex.png.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Right_Tex.png.meta new file mode 100644 index 0000000..a6b6689 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Right_Tex.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 411c36f0804e8c248a3f6470ca50cd85 +timeCreated: 1497132177 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Up_Tex.png b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Up_Tex.png new file mode 100644 index 0000000..61b29e7 Binary files /dev/null and b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Up_Tex.png differ diff --git a/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Up_Tex.png.meta b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Up_Tex.png.meta new file mode 100644 index 0000000..48f7282 --- /dev/null +++ b/Commonly Used/Skyboxes/Nebula/HDRI/Starfield/Up_Tex.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 8313f24c5bda59240aabef5e6c46f9a5 +timeCreated: 1497132180 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 4096 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/TextureAtlasGenerator/TextureAtlasAutoRegen.cs b/TextureAtlasGenerator/TextureAtlasAutoRegen.cs new file mode 100644 index 0000000..16ba269 --- /dev/null +++ b/TextureAtlasGenerator/TextureAtlasAutoRegen.cs @@ -0,0 +1,67 @@ +using UnityEditor; +using UnityEngine; +using System.Linq; + +namespace gay.lilyy.TextureAtlasGenerator +{ + public class TextureAtlasAutoRegen : AssetPostprocessor + { + private const string MenuPath = "LillithRosePup/Import Regens/Texture Atlas"; + private const string PrefKey = "TextureAtlasGenerator.AutoRegen"; + + [MenuItem(MenuPath)] + private static void Toggle() + { + bool enabled = !EditorPrefs.GetBool(PrefKey, true); + EditorPrefs.SetBool(PrefKey, enabled); + Menu.SetChecked(MenuPath, enabled); + } + + [MenuItem(MenuPath, true)] + private static bool ToggleValidate() + { + Menu.SetChecked(MenuPath, EditorPrefs.GetBool(PrefKey, true)); + return true; + } + + private static bool IsEnabled() + { + return EditorPrefs.GetBool(PrefKey, true); + } + static void OnPostprocessAllAssets( + string[] importedAssets, + string[] deletedAssets, + string[] movedAssets, + string[] movedFromAssetPaths) + { + if (!IsEnabled()) + return; + + if (importedAssets.Length == 0) + return; + + var atlases = AssetDatabase + .FindAssets("t:TextureAtlasSettings") + .Select(guid => + AssetDatabase.LoadAssetAtPath( + AssetDatabase.GUIDToAssetPath(guid))) + .Where(s => s && s.textures != null && s.textures.Length > 0) + .ToArray(); + + if (atlases.Length == 0) + return; + + foreach (string path in importedAssets) + { + var tex = AssetDatabase.LoadAssetAtPath(path); + if (!tex) continue; + + foreach (var atlas in atlases) + { + if (atlas.textures.Contains(tex)) + TextureAtlasEditor.GenerateAtlas(atlas); + } + } + } + } +} diff --git a/TextureAtlasGenerator/TextureAtlasAutoRegen.cs.meta b/TextureAtlasGenerator/TextureAtlasAutoRegen.cs.meta new file mode 100644 index 0000000..46dfc71 --- /dev/null +++ b/TextureAtlasGenerator/TextureAtlasAutoRegen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f62a8a2b00eb0fe4598d1b45218ddfad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TextureAtlasGenerator/TextureAtlasGenerator.cs b/TextureAtlasGenerator/TextureAtlasGenerator.cs index 63c4635..3363c5b 100644 --- a/TextureAtlasGenerator/TextureAtlasGenerator.cs +++ b/TextureAtlasGenerator/TextureAtlasGenerator.cs @@ -5,119 +5,124 @@ using System.IO; namespace gay.lilyy.TextureAtlasGenerator { - [CreateAssetMenu(fileName = "TextureAtlasSettings", menuName = "Texture Atlas/Settings")] - public class TextureAtlasSettings : ScriptableObject + [CreateAssetMenu(fileName = "TextureAtlasSettings", menuName = "Texture Atlas/Settings")] + public class TextureAtlasSettings : ScriptableObject + { + public Texture2D[] textures; + public int atlasSize = 1024; + public int columns = 4; + public int rows = 4; + public string savePath = "Assets/Atlas.png"; + } + + [CustomEditor(typeof(TextureAtlasSettings))] + public class TextureAtlasEditor : Editor + { + private SerializedProperty texturesProp; + private SerializedProperty columnsProp; + private SerializedProperty rowsProp; + + private void OnEnable() { - public Texture2D[] textures; - public int atlasSize = 1024; - public int columns = 4; - public int rows = 4; - public string savePath = "Assets/Atlas.png"; + texturesProp = serializedObject.FindProperty("textures"); + columnsProp = serializedObject.FindProperty("columns"); + rowsProp = serializedObject.FindProperty("rows"); } - [CustomEditor(typeof(TextureAtlasSettings))] - public class TextureAtlasEditor : Editor + public override void OnInspectorGUI() { - private SerializedProperty texturesProp; - private SerializedProperty columnsProp; - private SerializedProperty rowsProp; + serializedObject.Update(); - private void OnEnable() - { - texturesProp = serializedObject.FindProperty("textures"); - columnsProp = serializedObject.FindProperty("columns"); - rowsProp = serializedObject.FindProperty("rows"); - } + EditorGUILayout.LabelField("Texture Atlas Settings", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(serializedObject.FindProperty("atlasSize")); + EditorGUILayout.PropertyField(columnsProp); + EditorGUILayout.PropertyField(rowsProp); + EditorGUILayout.PropertyField(serializedObject.FindProperty("savePath")); - public override void OnInspectorGUI() - { - serializedObject.Update(); + DrawTextureGrid(); - EditorGUILayout.LabelField("Texture Atlas Settings", EditorStyles.boldLabel); - EditorGUILayout.PropertyField(serializedObject.FindProperty("atlasSize")); - EditorGUILayout.PropertyField(columnsProp); - EditorGUILayout.PropertyField(rowsProp); - EditorGUILayout.PropertyField(serializedObject.FindProperty("savePath")); + if (GUILayout.Button("Generate Atlas")) + { + GenerateAtlas(); + } - DrawTextureGrid(); - - if (GUILayout.Button("Generate Atlas")) - { - GenerateAtlas(); - } - - serializedObject.ApplyModifiedProperties(); - } - - private void DrawTextureGrid() - { - int totalSlots = columnsProp.intValue * rowsProp.intValue; - if (texturesProp.arraySize != totalSlots) - texturesProp.arraySize = totalSlots; - - EditorGUILayout.LabelField("Textures Grid", EditorStyles.boldLabel); - int gridWidth = 80; - int gridHeight = 80; - - for (int y = 0; y < rowsProp.intValue; y++) - { - EditorGUILayout.BeginHorizontal(); - for (int x = 0; x < columnsProp.intValue; x++) - { - int index = y * columnsProp.intValue + x; - SerializedProperty textureProp = texturesProp.GetArrayElementAtIndex(index); - textureProp.objectReferenceValue = (Texture2D)EditorGUILayout.ObjectField( - textureProp.objectReferenceValue, typeof(Texture2D), false, - GUILayout.Width(gridWidth), GUILayout.Height(gridHeight)); - } - EditorGUILayout.EndHorizontal(); - } - } - - private void GenerateAtlas() - { - TextureAtlasSettings settings = (TextureAtlasSettings)target; - if (settings.textures == null || settings.textures.Length == 0) - { - Debug.LogError("No textures assigned!"); - return; - } - - Texture2D atlas = new Texture2D(settings.atlasSize, settings.atlasSize); - Color[] blackPixels = new Color[settings.atlasSize * settings.atlasSize]; - for (int i = 0; i < blackPixels.Length; i++) blackPixels[i] = Color.black; - atlas.SetPixels(blackPixels); - - int cellWidth = settings.atlasSize / settings.columns; - int cellHeight = settings.atlasSize / settings.rows; - - for (int i = 0; i < settings.textures.Length; i++) - { - if (settings.textures[i] == null) continue; - int x = (i % settings.columns) * cellWidth; - int y = (settings.rows - 1 - (i / settings.columns)) * cellHeight; - Texture2D resized = ResizeTexture(settings.textures[i], cellWidth, cellHeight); - atlas.SetPixels(x, y, cellWidth, cellHeight, resized.GetPixels(), 0); - } - - atlas.Apply(); - byte[] bytes = atlas.EncodeToPNG(); - File.WriteAllBytes(settings.savePath, bytes); - AssetDatabase.Refresh(); - Debug.Log("Atlas saved at: " + settings.savePath); - } - - - private Texture2D ResizeTexture(Texture2D texture, int width, int height) - { - RenderTexture rt = new RenderTexture(width, height, 32); - Graphics.Blit(texture, rt); - Texture2D result = new Texture2D(width, height); - RenderTexture.active = rt; - result.ReadPixels(new Rect(0, 0, width, height), 0, 0); - result.Apply(); - RenderTexture.active = null; - return result; - } + serializedObject.ApplyModifiedProperties(); } + + private void DrawTextureGrid() + { + int totalSlots = columnsProp.intValue * rowsProp.intValue; + if (texturesProp.arraySize != totalSlots) + texturesProp.arraySize = totalSlots; + + EditorGUILayout.LabelField("Textures Grid", EditorStyles.boldLabel); + int gridWidth = 80; + int gridHeight = 80; + + for (int y = 0; y < rowsProp.intValue; y++) + { + EditorGUILayout.BeginHorizontal(); + for (int x = 0; x < columnsProp.intValue; x++) + { + int index = y * columnsProp.intValue + x; + SerializedProperty textureProp = texturesProp.GetArrayElementAtIndex(index); + textureProp.objectReferenceValue = (Texture2D)EditorGUILayout.ObjectField( + textureProp.objectReferenceValue, typeof(Texture2D), false, + GUILayout.Width(gridWidth), GUILayout.Height(gridHeight)); + } + EditorGUILayout.EndHorizontal(); + } + } + + private void GenerateAtlas() + { + TextureAtlasSettings settings = (TextureAtlasSettings)target; + GenerateAtlas(settings); + } + + internal static void GenerateAtlas(TextureAtlasSettings settings) + { + if (settings.textures == null || settings.textures.Length == 0) + { + Debug.LogError("No textures assigned!"); + return; + } + + Texture2D atlas = new Texture2D(settings.atlasSize, settings.atlasSize); + Color[] blackPixels = new Color[settings.atlasSize * settings.atlasSize]; + for (int i = 0; i < blackPixels.Length; i++) blackPixels[i] = Color.black; + atlas.SetPixels(blackPixels); + + int cellWidth = settings.atlasSize / settings.columns; + int cellHeight = settings.atlasSize / settings.rows; + + for (int i = 0; i < settings.textures.Length; i++) + { + if (settings.textures[i] == null) continue; + int x = (i % settings.columns) * cellWidth; + int y = (settings.rows - 1 - (i / settings.columns)) * cellHeight; + Texture2D resized = ResizeTexture(settings.textures[i], cellWidth, cellHeight); + atlas.SetPixels(x, y, cellWidth, cellHeight, resized.GetPixels(), 0); + } + + atlas.Apply(); + byte[] bytes = atlas.EncodeToPNG(); + File.WriteAllBytes(settings.savePath, bytes); + AssetDatabase.Refresh(); + Debug.Log("Atlas saved at: " + settings.savePath); + } + + + private static Texture2D ResizeTexture(Texture2D texture, int width, int height) + { + RenderTexture rt = new RenderTexture(width, height, 32); + Graphics.Blit(texture, rt); + Texture2D result = new Texture2D(width, height); + RenderTexture.active = rt; + result.ReadPixels(new Rect(0, 0, width, height), 0, 0); + result.Apply(); + RenderTexture.active = null; + return result; + } + } } diff --git a/TextureStitcher.meta b/TextureStitcher.meta new file mode 100644 index 0000000..c47df09 --- /dev/null +++ b/TextureStitcher.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aa7127f4d0f097941933b00115d22660 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TextureStitcher/TextureStitcher.asmdef b/TextureStitcher/TextureStitcher.asmdef new file mode 100644 index 0000000..e452dcb --- /dev/null +++ b/TextureStitcher/TextureStitcher.asmdef @@ -0,0 +1,16 @@ +{ + "name": "TextureStitcher", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/TextureStitcher/TextureStitcher.asmdef.meta b/TextureStitcher/TextureStitcher.asmdef.meta new file mode 100644 index 0000000..e56007f --- /dev/null +++ b/TextureStitcher/TextureStitcher.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dd440ea69f98580448e1719b0b71607d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TextureStitcher/TextureStitcher.cs b/TextureStitcher/TextureStitcher.cs new file mode 100644 index 0000000..7ea3a8b --- /dev/null +++ b/TextureStitcher/TextureStitcher.cs @@ -0,0 +1,129 @@ +using UnityEditor; +using UnityEngine; +using System.IO; + +namespace gay.lilyy.TextureStitcher +{ + [CreateAssetMenu(fileName = "TextureStitcherSettings", menuName = "Texture Stitcher/Settings")] + public class TextureStitcherSettings : ScriptableObject + { + public Texture2D[] textures; + public string savePath = "Assets/StitchedTexture.png"; + } + + [CustomEditor(typeof(TextureStitcherSettings))] + public class TextureStitcherEditor : Editor + { + private SerializedProperty texturesProp; + private SerializedProperty savePathProp; + + private void OnEnable() + { + texturesProp = serializedObject.FindProperty("textures"); + savePathProp = serializedObject.FindProperty("savePath"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.LabelField("Texture Layers (Top → Bottom)", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(savePathProp); + + DrawReversedArray(texturesProp); + + GUILayout.Space(10); + + if (GUILayout.Button("Generate Stitched Texture")) + GenerateStitchedTexture(); + + serializedObject.ApplyModifiedProperties(); + } + + private void DrawReversedArray(SerializedProperty array) + { + if (!array.isArray) + return; + + // Draw size field (normal Unity behavior) + EditorGUILayout.PropertyField(array.FindPropertyRelative("Array.size")); + + // Reverse array in-place + int count = array.arraySize; + for (int i = 0; i < count / 2; i++) + array.MoveArrayElement(i, count - 1 - i); + + // Draw array normally + EditorGUILayout.PropertyField(array, GUIContent.none, true); + + // Restore original order + for (int i = 0; i < count / 2; i++) + array.MoveArrayElement(i, count - 1 - i); + } + + private void GenerateStitchedTexture() + { + TextureStitcherSettings settings = (TextureStitcherSettings)target; + GenerateStitchedTexture(settings); + } + + internal static void GenerateStitchedTexture(TextureStitcherSettings settings) + { + int width = 0; + int height = 0; + + foreach (var tex in settings.textures) + { + if (!tex) continue; + width = Mathf.Max(width, tex.width); + height = Mathf.Max(height, tex.height); + } + + Texture2D output = new Texture2D(width, height, TextureFormat.RGBA32, false); + Color[] pixels = new Color[width * height]; + for (int i = 0; i < pixels.Length; i++) pixels[i] = Color.clear; + + output.SetPixels(pixels); + + // Bottom → top + for (int i = 0; i < settings.textures.Length; i++) + { + var tex = settings.textures[i]; + if (!tex) continue; + + Texture2D resized = Resize(tex, width, height); + Color[] src = resized.GetPixels(); + Color[] dst = output.GetPixels(); + + for (int p = 0; p < dst.Length; p++) + { + Color s = src[p]; + dst[p] = Color.Lerp(dst[p], s, s.a); + } + + output.SetPixels(dst); + } + + output.Apply(); + File.WriteAllBytes(settings.savePath, output.EncodeToPNG()); + AssetDatabase.Refresh(); + + Debug.Log("Stitched texture saved to " + settings.savePath); + } + + private static Texture2D Resize(Texture2D src, int width, int height) + { + RenderTexture rt = RenderTexture.GetTemporary(width, height, 0); + Graphics.Blit(src, rt); + + RenderTexture.active = rt; + Texture2D result = new Texture2D(width, height, TextureFormat.RGBA32, false); + result.ReadPixels(new Rect(0, 0, width, height), 0, 0); + result.Apply(); + + RenderTexture.active = null; + RenderTexture.ReleaseTemporary(rt); + return result; + } + } +} diff --git a/TextureStitcher/TextureStitcher.cs.meta b/TextureStitcher/TextureStitcher.cs.meta new file mode 100644 index 0000000..312d22b --- /dev/null +++ b/TextureStitcher/TextureStitcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7ebbfd7bebbeb0748bb1bf5a9191377f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TextureStitcher/TextureStitcherAutoRegen.cs b/TextureStitcher/TextureStitcherAutoRegen.cs new file mode 100644 index 0000000..10e77e8 --- /dev/null +++ b/TextureStitcher/TextureStitcherAutoRegen.cs @@ -0,0 +1,67 @@ +using UnityEditor; +using UnityEngine; +using System.Linq; + +namespace gay.lilyy.TextureStitcher +{ + public class TextureStitcherAutoRegen : AssetPostprocessor + { + private const string MenuPath = "LillithRosePup/Import Regens/Texture Stitcher"; + private const string PrefKey = "TextureStitcher.AutoRegen"; + + [MenuItem(MenuPath)] + private static void Toggle() + { + bool enabled = !EditorPrefs.GetBool(PrefKey, true); + EditorPrefs.SetBool(PrefKey, enabled); + Menu.SetChecked(MenuPath, enabled); + } + + [MenuItem(MenuPath, true)] + private static bool ToggleValidate() + { + Menu.SetChecked(MenuPath, EditorPrefs.GetBool(PrefKey, true)); + return true; + } + + private static bool IsEnabled() + { + return EditorPrefs.GetBool(PrefKey, true); + } + static void OnPostprocessAllAssets( + string[] importedAssets, + string[] deletedAssets, + string[] movedAssets, + string[] movedFromAssetPaths) + { + if (!IsEnabled()) + return; + + if (importedAssets.Length == 0) + return; + + var stitchers = AssetDatabase + .FindAssets("t:TextureStitcherSettings") + .Select(guid => + AssetDatabase.LoadAssetAtPath( + AssetDatabase.GUIDToAssetPath(guid))) + .Where(s => s && s.textures != null && s.textures.Length > 0) + .ToArray(); + + if (stitchers.Length == 0) + return; + + foreach (string path in importedAssets) + { + var tex = AssetDatabase.LoadAssetAtPath(path); + if (!tex) continue; + + foreach (var stitcher in stitchers) + { + if (stitcher.textures.Contains(tex)) + TextureStitcherEditor.GenerateStitchedTexture(stitcher); + } + } + } + } +} diff --git a/TextureStitcher/TextureStitcherAutoRegen.cs.meta b/TextureStitcher/TextureStitcherAutoRegen.cs.meta new file mode 100644 index 0000000..93ceb9d --- /dev/null +++ b/TextureStitcher/TextureStitcherAutoRegen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f4211ffa1dc66ca43af9c753c61933c1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: