├── Packages └── manifest.json ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── NetworkManager.asset ├── TimeManager.asset ├── EditorBuildSettings.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorSettings.asset ├── PresetManager.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── Physics2DSettings.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── QualitySettings.asset ├── InputManager.asset └── ProjectSettings.asset ├── Assets ├── SphereGenerator │ ├── Texture │ │ ├── viking_merged_color_mosaic_2k.png │ │ └── viking_merged_color_mosaic_2k.png.meta │ ├── README.md.meta │ ├── Scenes.meta │ ├── Materials.meta │ ├── Scripts.meta │ ├── Texture.meta │ ├── Scenes │ │ └── SphereGeneratorSample.unity.meta │ ├── Scripts │ │ ├── Builders.meta │ │ ├── Editor.meta │ │ ├── Generator.meta │ │ ├── Platonics.meta │ │ ├── Platonics │ │ │ ├── Cube.cs.meta │ │ │ ├── Octahedron.cs.meta │ │ │ ├── Dodecahedron.cs.meta │ │ │ ├── IPlatonicSolid.cs.meta │ │ │ ├── Icosahedron.cs.meta │ │ │ ├── Tetrahedron.cs.meta │ │ │ ├── UvPolyhedron.cs.meta │ │ │ ├── IPlatonicSolid.cs │ │ │ ├── Tetrahedron.cs │ │ │ ├── Octahedron.cs │ │ │ ├── UvPolyhedron.cs │ │ │ ├── Cube.cs │ │ │ ├── Icosahedron.cs │ │ │ └── Dodecahedron.cs │ │ ├── Builders │ │ │ ├── MeshData.cs.meta │ │ │ ├── SphereBuilder.cs.meta │ │ │ ├── TriangleFace.cs.meta │ │ │ ├── UvSphereBuilder.cs.meta │ │ │ ├── TriangleFace.cs │ │ │ ├── MeshData.cs │ │ │ ├── UvSphereBuilder.cs │ │ │ └── SphereBuilder.cs │ │ ├── Generator │ │ │ ├── SphereGenerator.cs.meta │ │ │ └── SphereGenerator.cs │ │ └── Editor │ │ │ ├── SphereGenerator_Editor.cs.meta │ │ │ └── SphereGenerator_Editor.cs │ ├── Materials │ │ ├── viking_merged_color_mosaic_2k.mat.meta │ │ └── viking_merged_color_mosaic_2k.mat │ └── README.md └── SphereGenerator.meta ├── .gitignore ├── README.md └── .vscode └── settings.json /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.1.5f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Texture/viking_merged_color_mosaic_2k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexisgea/sphere_generator/HEAD/Assets/SphereGenerator/Texture/viking_merged_color_mosaic_2k.png -------------------------------------------------------------------------------- /Assets/SphereGenerator/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3279621a8b19469419ca0864fc762f95 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e533a37d8d1fafd468e49bba0fb29683 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cf9cf01e9cce6d47bbaf4b4f8f71b87 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f8a1865c42c2e9478ca839199ed872d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Texture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 257e75ef56a912d47a84d3192407a146 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scenes/SphereGeneratorSample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0825f1b4a21fc96458ec84ad4dad6d20 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2aeafbb1126b4244a98e935f3882099 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Generator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97431e2ebfcb52f45881698fc58cd151 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccd0fce98e8e59e4792def1008e90ed5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.0167 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Materials/viking_merged_color_mosaic_2k.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18c63d83129c05e4e96e54b0456ccdbf 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Cube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52ad22c56ecef7e43854f055fa251ad9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/MeshData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6028e8717bf560c409e754e2ece15b9d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Octahedron.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bd17bea8da97f54fa0296e56b89ccec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/SphereBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b261ae9e5e9d64e4da723979fbb72fd5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/TriangleFace.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb3a1573ca8e51b44805b1e072272307 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/UvSphereBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aba1287b866d2214b8e7705b4084718d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Generator/SphereGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5a5c9d161b2af542a3b491cbabd658c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Dodecahedron.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65d853c680167f949b6a9a06dba19a8a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/IPlatonicSolid.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 122d0ee66276a4c43bee5fb731b92310 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Icosahedron.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73d2c56dcce02a74da6fb54a92a8817a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Tetrahedron.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 439562ffd0d3ecb429c891e0179e67e6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/UvPolyhedron.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35658bcc66962c645b9cd98925a1bf0a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Editor/SphereGenerator_Editor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22e5c3556226ace4e967b90acd2096f8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/IPlatonicSolid.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public interface IPlatonicSolid { 9 | List Vertices { get; } 10 | List Faces { get; } 11 | Vector3 NorthPole { get; } 12 | 13 | List RemapVertices(List vertices, List faces); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PostProcessing 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/README.md: -------------------------------------------------------------------------------- 1 | # How to use 2 | Create Icosahedron Sphere and UV Sphere in one click in Unity. 3 | 4 | To use it, add this folder to your Assets folder of your unity project. Then just add the SphereMesher.cs script to an empty gameobject and "poof!", magic happens! 5 | 6 | On the inspector you can select if you want an Icosahedron Sphere or a UV Sphere as well as setting the size and resolution. Then press "generate" to update the mesh. The mesh will be generated from scratch on play. 7 | 8 | Hope you find this useful. 9 | 10 | Check the blog post I made about this for more details: https://www.alexisgiard.com/icosahedron-sphere/ 11 | 12 | Source on https://github.com/alexisgea/sphere_mesher 13 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # How to use 2 | Create Icosahedron Sphere and UV Sphere in one click in Unity. 3 | 4 | To use it, add this folder to your Assets folder of your unity project. Then just add the SphereMesher.cs script to an empty gameobject and "poof!", magic happens! 5 | 6 | On the inspector you can select if you want an Icosahedron Sphere or a UV Sphere as well as setting the size and resolution. Then press "generate" to update the mesh. The mesh will be generated from scratch on play. 7 | 8 | Hope you find this useful. 9 | 10 | Check the blog post I made about this for more details: 11 | https://www.alexisgiard.com/icosahedron-sphere/ 12 | https://www.alexisgiard.com/icosahedron-sphere-remastered/ 13 | 14 | Source on https://github.com/alexisgea/sphere_generator 15 | 16 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/TriangleFace.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | /// 9 | /// Stores the indices of the vertices forming a triangle face. 10 | /// 11 | public class TriangleFace { 12 | public int IndA {set; get;} 13 | public int IndB {set; get;} 14 | public int IndC {set; get;} 15 | 16 | public TriangleFace(int indA, int indB, int indC) { 17 | IndA = indA; 18 | IndB = indB; 19 | IndC = indC; 20 | } 21 | 22 | public void SetIndA(int newIa) { IndA = newIa;} 23 | public void SetIndB(int newIb) { IndB = newIb;} 24 | public void SetIndC(int newIc) { IndC = newIc;} 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/MeshData.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using UnityEngine; 4 | 5 | namespace AlexisGea { 6 | /// 7 | /// Store mesh data for procedural primitive generation. 8 | /// 9 | public class MeshData { 10 | public Vector3[] Vertices { private set; get; } 11 | public int[] Triangles { private set; get; } 12 | public Vector2[] Uv { private set; get; } 13 | public Vector3[] Normals {private set; get; } 14 | public Vector4[] Tangents { private set; get; } 15 | 16 | public MeshData(Vector3[] verts, int[] tris, Vector2[] uv, Vector3[] normals, Vector4[] tans) { 17 | Vertices = verts; 18 | Triangles = tris; 19 | Uv = uv; 20 | Normals = normals; 21 | Tangents = tans; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 1 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitignore":true, 7 | "**/.gitmodules":true, 8 | "**/*.booproj":true, 9 | "**/*.pidb":true, 10 | "**/*.suo":true, 11 | "**/*.user":true, 12 | "**/*.userprefs":true, 13 | "**/*.unityproj":true, 14 | "**/*.dll":true, 15 | "**/*.exe":true, 16 | "**/*.pdf":true, 17 | "**/*.mid":true, 18 | "**/*.midi":true, 19 | "**/*.wav":true, 20 | "**/*.gif":true, 21 | "**/*.ico":true, 22 | "**/*.jpg":true, 23 | "**/*.jpeg":true, 24 | "**/*.png":true, 25 | "**/*.psd":true, 26 | "**/*.tga":true, 27 | "**/*.tif":true, 28 | "**/*.tiff":true, 29 | "**/*.3ds":true, 30 | "**/*.3DS":true, 31 | "**/*.fbx":true, 32 | "**/*.FBX":true, 33 | "**/*.lxo":true, 34 | "**/*.LXO":true, 35 | "**/*.ma":true, 36 | "**/*.MA":true, 37 | "**/*.obj":true, 38 | "**/*.OBJ":true, 39 | "**/*.asset":true, 40 | "**/*.cubemap":true, 41 | "**/*.flare":true, 42 | "**/*.mat":true, 43 | "**/*.meta":true, 44 | "**/*.prefab":true, 45 | "**/*.unity":true, 46 | "build/":true, 47 | "Build/":true, 48 | "Library/":true, 49 | "library/":true, 50 | "obj/":true, 51 | "Obj/":true, 52 | "ProjectSettings/":true, 53 | "temp/":true, 54 | "Temp/":true 55 | } 56 | } -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Tetrahedron.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public class Tetrahedron : IPlatonicSolid { 9 | public List Vertices { private set; get; } 10 | public List Faces { private set; get; } 11 | public Vector3 NorthPole { private set; get; } 12 | 13 | public Tetrahedron() { 14 | Vertices = CreateStartingVertices(); 15 | Faces = CreateStartingFaces(); 16 | } 17 | 18 | public List RemapVertices(List vertices, List faces) { 19 | return vertices; 20 | } 21 | 22 | private List CreateStartingVertices() { 23 | List startingVert = new List(); 24 | 25 | NorthPole = Vector3.up; 26 | 27 | startingVert.Add(new Vector3(1f, 1f, 1f)); 28 | startingVert.Add(new Vector3(1f, -1f, -1f)); 29 | startingVert.Add(new Vector3(-1f, 1f, -1f)); 30 | startingVert.Add(new Vector3(-1f, -1f, 1f)); 31 | 32 | return startingVert; 33 | } 34 | 35 | private List CreateStartingFaces() { 36 | List startingFaces = new List(); 37 | 38 | // top 1 39 | startingFaces.Add(new TriangleFace(0, 1, 2)); 40 | // top 2 41 | startingFaces.Add(new TriangleFace(0, 2, 3)); 42 | 43 | // bottom 1 44 | startingFaces.Add(new TriangleFace(1, 3, 2)); 45 | // bottom 2 46 | startingFaces.Add(new TriangleFace(0, 3, 1)); 47 | 48 | return startingFaces; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Octahedron.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public class Octahedron : IPlatonicSolid { 9 | public List Vertices { private set; get; } 10 | public List Faces { private set; get; } 11 | public Vector3 NorthPole { private set; get; } 12 | 13 | public Octahedron() { 14 | Vertices = CreateStartingVertices(); 15 | Faces = CreateStartingFaces(); 16 | } 17 | 18 | public List RemapVertices(List vertices, List faces) { 19 | return vertices; 20 | } 21 | 22 | private List CreateStartingVertices() { 23 | List startingVert = new List(); 24 | 25 | NorthPole = Vector3.up; 26 | 27 | startingVert.Add(new Vector3(1f, 0f, 0f)); 28 | startingVert.Add(new Vector3(-1f, 0f, 0f)); 29 | startingVert.Add(new Vector3(0f, 1f, 0f)); 30 | startingVert.Add(new Vector3(0f, -1f, 0f)); 31 | startingVert.Add(new Vector3(0f, 0f, 1f)); 32 | startingVert.Add(new Vector3(0f, 0f, -1f)); 33 | 34 | return startingVert; 35 | } 36 | 37 | private List CreateStartingFaces() { 38 | List startingFaces = new List(); 39 | 40 | startingFaces.Add(new TriangleFace(2, 0, 5)); 41 | startingFaces.Add(new TriangleFace(2, 5, 1)); 42 | startingFaces.Add(new TriangleFace(2, 1, 4)); 43 | startingFaces.Add(new TriangleFace(2, 4, 0)); 44 | 45 | startingFaces.Add(new TriangleFace(3, 5, 0)); 46 | startingFaces.Add(new TriangleFace(3, 1, 5)); 47 | startingFaces.Add(new TriangleFace(3, 4, 1)); 48 | startingFaces.Add(new TriangleFace(3, 0, 4)); 49 | 50 | return startingFaces; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/UvSphereBuilder.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | /// 9 | /// Factory class to build a UV sphere (a warped uv plane). 10 | /// 11 | public static class UvSphereBuilder { 12 | /// 13 | /// Generate a UV sphere. 14 | /// 15 | /// Number of latitude lines (vertices on the y axis). 16 | public static MeshData Generate(float radius, int resolution) { 17 | 18 | int vSize = 4 * resolution; // to make it closer to what the other have 19 | int uSize = vSize * 2; 20 | 21 | Vector3[] vertices = new Vector3[(uSize + 1) * (vSize + 1)]; 22 | int[] triangles = new int[uSize * vSize * 6]; 23 | Vector2[] uv = new Vector2[vertices.Length]; 24 | Vector3[] normals = new Vector3[vertices.Length]; 25 | Vector4[] tangents = new Vector4[vertices.Length]; 26 | 27 | Vector4 tangent = new Vector4(1f, 0f, 0f, -1f); 28 | 29 | for (int i = 0, v = 0; v <= vSize; v++) { 30 | for (int u = 0; u <= uSize; u++, i++) { 31 | float theta = 2f * Mathf.PI * (float)u/uSize + Mathf.PI; 32 | float phi = Mathf.PI * (float)v/vSize; 33 | 34 | float x = Mathf.Cos(theta) * Mathf.Sin(phi) * radius; 35 | float y = -Mathf.Cos(phi) * radius; 36 | float z = Mathf.Sin(theta) * Mathf.Sin(phi) * radius; 37 | 38 | vertices[i] = new Vector3(x, y, z); 39 | uv[i] = new Vector2((float)u/uSize, (float)v/vSize); 40 | normals[i] = vertices[i].normalized; 41 | tangents[i] = tangent; 42 | } 43 | } 44 | 45 | for (int ti = 0, vi = 0, y = 0; y < vSize; y++, vi++) { 46 | for (int x = 0; x < uSize; x++, ti += 6, vi++) { 47 | triangles[ti] = vi; 48 | triangles[ti + 3] = triangles[ti + 2] = vi + 1; 49 | triangles[ti + 4] = triangles[ti + 1] = vi + uSize + 1; 50 | triangles[ti + 5] = vi + uSize + 2; 51 | } 52 | } 53 | 54 | return new MeshData(vertices, triangles, uv, normals, tangents); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Texture/viking_merged_color_mosaic_2k.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 911ce1c8dbeac7d45b3ed2134d43ebf1 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 5 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: -1 36 | wrapV: -1 37 | wrapW: -1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 1 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 0 53 | textureShape: 1 54 | singleChannelComponent: 0 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - serializedVersion: 2 60 | buildTarget: DefaultTexturePlatform 61 | maxTextureSize: 2048 62 | resizeAlgorithm: 0 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | androidETC2FallbackOverride: 0 70 | spriteSheet: 71 | serializedVersion: 2 72 | sprites: [] 73 | outline: [] 74 | physicsShape: [] 75 | bones: [] 76 | spriteID: 77 | vertices: [] 78 | indices: 79 | edges: [] 80 | weights: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Materials/viking_merged_color_mosaic_2k.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: viking_merged_color_mosaic_2k 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 911ce1c8dbeac7d45b3ed2134d43ebf1, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Editor/SphereGenerator_Editor.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UnityEditor; 7 | 8 | namespace AlexisGea { 9 | [CustomEditor(typeof(SphereGenerator))] 10 | public class SphereGenerator_Editor : Editor { 11 | 12 | private SphereGenerator sphere; 13 | private bool _resolutionSafety = true; 14 | 15 | 16 | public override void OnInspectorGUI() { 17 | sphere.SphereType = (SphereType)EditorGUILayout.EnumPopup(new GUIContent("Sphere Type", 18 | "The base solid to use for generating the sphere." 19 | +"The UV Sphere works differently and only the Radius and Resolution are used."), sphere.SphereType); 20 | 21 | sphere.Radius = EditorGUILayout.FloatField(new GUIContent("Radius", 22 | "How big is the sphere. 0.5 gives the same size as a Unity Sphere."), sphere.Radius); 23 | 24 | sphere.Resolution = EditorGUILayout.IntField(new GUIContent("Resolution", "How many subdivision should be done." 25 | + "Warning, this is exponential and can be very CPU intensive."), sphere.Resolution); 26 | 27 | sphere.Smooth = EditorGUILayout.Toggle(new GUIContent("Smooth", "Smoothness of the sphere." 28 | +"Smooth takes much less vertices than otherwise and is faster to generate."), sphere.Smooth); 29 | 30 | sphere.RemapVertices = EditorGUILayout.Toggle(new GUIContent("Remap Vertices", 31 | "In some case the vertices are not evenly spread. This forces a recompute of the vertices' position." 32 | + "At the moment I only found an algorythm for the cube."), sphere.RemapVertices); 33 | 34 | if (GUILayout.Button("Update Mesh")) { 35 | ((SphereGenerator)target).GenerateMesh(); 36 | } 37 | 38 | // safety checks 39 | _resolutionSafety = EditorGUILayout.Toggle(new GUIContent("Resolution Safety", 40 | "Above resolution 6, it can take a while to generate a sphere and even crash your computer. Be warned." 41 | + "The resolution is maxed at 5 in case on non-smooth object."), _resolutionSafety); 42 | 43 | if(sphere.Radius < 0) { 44 | sphere.Radius = 0.5f; 45 | } 46 | 47 | if(sphere.Resolution < 1) { 48 | sphere.Resolution = 1; 49 | } 50 | 51 | if(_resolutionSafety && !sphere.Smooth && sphere.Resolution > 5) { 52 | sphere.Resolution = 5; 53 | } 54 | else if(_resolutionSafety && sphere.Smooth && sphere.Resolution > 6) { 55 | sphere.Resolution = 6; 56 | } 57 | } 58 | 59 | private void OnEnable() { 60 | sphere = (SphereGenerator)target; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/UvPolyhedron.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public class UvPolyhedron : IPlatonicSolid { 9 | public List Vertices { private set; get; } 10 | public List Faces { private set; get; } 11 | public Vector3 NorthPole { private set; get; } 12 | 13 | public UvPolyhedron() { 14 | Vertices = CreateStartingVertices(); 15 | Faces = CreateStartingFaces(); 16 | } 17 | 18 | public List RemapVertices(List vertices, List faces) { 19 | return vertices; 20 | } 21 | 22 | private List CreateStartingVertices() { 23 | List startingVert = new List(); 24 | 25 | // a vertical slice is an hexagon 26 | float phi = Mathf.Sqrt(3f)/2f; 27 | 28 | NorthPole = Vector3.up; 29 | 30 | startingVert.Add(new Vector3(0f, 1f, 0)); 31 | startingVert.Add(new Vector3(0f, -1f, 0f)); 32 | 33 | startingVert.Add(new Vector3(phi, 0.5f, 0f)); 34 | startingVert.Add(new Vector3(0f, 0.5f, -phi)); 35 | startingVert.Add(new Vector3(-phi, 0.5f, 0f)); 36 | startingVert.Add(new Vector3(0f, 0.5f, phi)); 37 | 38 | startingVert.Add(new Vector3(phi, -0.5f, 0f)); 39 | startingVert.Add(new Vector3(0f, -0.5f, -phi)); 40 | startingVert.Add(new Vector3(-phi, -0.5f, 0f)); 41 | startingVert.Add(new Vector3(0f, -0.5f, phi)); 42 | 43 | return startingVert; 44 | } 45 | 46 | private List CreateStartingFaces() { 47 | List startingFaces = new List(); 48 | 49 | // top 50 | startingFaces.Add(new TriangleFace(0, 2, 3)); 51 | startingFaces.Add(new TriangleFace(0, 3, 4)); 52 | startingFaces.Add(new TriangleFace(0, 4, 5)); 53 | startingFaces.Add(new TriangleFace(0, 5, 2)); 54 | 55 | // sides 56 | startingFaces.Add(new TriangleFace(3, 2, 6)); 57 | startingFaces.Add(new TriangleFace(3, 6, 7)); 58 | startingFaces.Add(new TriangleFace(4, 3, 7)); 59 | startingFaces.Add(new TriangleFace(4, 7, 8)); 60 | startingFaces.Add(new TriangleFace(5, 4, 8)); 61 | startingFaces.Add(new TriangleFace(5, 8, 9)); 62 | startingFaces.Add(new TriangleFace(2, 5, 9)); 63 | startingFaces.Add(new TriangleFace(2, 9, 6)); 64 | 65 | // bottom 66 | startingFaces.Add(new TriangleFace(1, 7, 6)); 67 | startingFaces.Add(new TriangleFace(1, 8, 7)); 68 | startingFaces.Add(new TriangleFace(1, 9, 8)); 69 | startingFaces.Add(new TriangleFace(1, 6, 9)); 70 | 71 | 72 | return startingFaces; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Cube.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public class Cube : IPlatonicSolid { 9 | public List Vertices { private set; get; } 10 | public List Faces { private set; get; } 11 | public Vector3 NorthPole { private set; get; } 12 | 13 | public Cube() { 14 | Vertices = CreateStartingVertices(); 15 | Faces = CreateStartingFaces(); 16 | } 17 | 18 | public List RemapVertices(List vertices, List faces) { 19 | for(int i = 0; i < vertices.Count; i++) { 20 | 21 | Vector3 v = vertices[i]; 22 | float x2 = v.x * v.x; 23 | float y2 = v.y * v.y; 24 | float z2 = v.z * v.z; 25 | Vector3 s; 26 | s.x = v.x * Mathf.Sqrt(1f - y2 / 2f - z2 / 2f + y2 * z2 / 3f); 27 | s.y = v.y * Mathf.Sqrt(1f - x2 / 2f - z2 / 2f + x2 * z2 / 3f); 28 | s.z = v.z * Mathf.Sqrt(1f - x2 / 2f - y2 / 2f + x2 * y2 / 3f); 29 | 30 | vertices[i] = s; 31 | } 32 | return vertices; 33 | } 34 | 35 | private List CreateStartingVertices() { 36 | List startingVert = new List(); 37 | 38 | NorthPole = Vector3.up; 39 | 40 | startingVert.Add(new Vector3(-1f, 1f, -1f)); 41 | startingVert.Add(new Vector3(-1f, 1f, 1f)); 42 | startingVert.Add(new Vector3(1f, 1f, 1f)); 43 | startingVert.Add(new Vector3(1f, 1f, -1f)); 44 | 45 | startingVert.Add(new Vector3(-1f, -1f, -1f)); 46 | startingVert.Add(new Vector3(-1f, -1f, 1f)); 47 | startingVert.Add(new Vector3(1f, -1f, 1f)); 48 | startingVert.Add(new Vector3(1f, -1f, -1f)); 49 | 50 | return startingVert; 51 | } 52 | 53 | private List CreateStartingFaces() { 54 | List startingFaces = new List(); 55 | 56 | // Y pos face (top) 57 | startingFaces.Add(new TriangleFace(3, 0, 1)); 58 | startingFaces.Add(new TriangleFace(3, 1, 2)); 59 | //Y neg face (bottom) 60 | startingFaces.Add(new TriangleFace(7, 5, 4)); 61 | startingFaces.Add(new TriangleFace(7, 6, 5)); 62 | 63 | // Z neg face (front) 64 | startingFaces.Add(new TriangleFace(3, 4, 0)); 65 | startingFaces.Add(new TriangleFace(3, 7, 4)); 66 | // Z pos face (back) 67 | startingFaces.Add(new TriangleFace(1, 5, 6)); 68 | startingFaces.Add(new TriangleFace(1, 6, 2)); 69 | 70 | // X pos face (right) 71 | startingFaces.Add(new TriangleFace(2, 7, 3)); 72 | startingFaces.Add(new TriangleFace(2, 6, 7)); 73 | // X neg face (left) 74 | startingFaces.Add(new TriangleFace(0, 5, 1)); 75 | startingFaces.Add(new TriangleFace(0, 4, 5)); 76 | 77 | return startingFaces; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Generator/SphereGenerator.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public enum SphereType {tetrasphere, cubesphere, octasphere, dodecasphere, icosphere, uvsphere} 9 | 10 | /// 11 | /// Mesh generator script to be used as component on gameobjects. 12 | /// Resolution is how many subdivision should occur with 1 being the minimum. 13 | /// Drop on a game object, chose a sphere type, set resolution and radius then click generate. 14 | /// Poof! Magic happens. 15 | /// 16 | [RequireComponent(typeof(MeshRenderer))] 17 | [RequireComponent(typeof(MeshFilter))] 18 | [DisallowMultipleComponent] 19 | public class SphereGenerator : MonoBehaviour { 20 | 21 | [HideInInspector] public SphereType SphereType = SphereType.icosphere; 22 | [HideInInspector] public float Radius = 0.5f; 23 | [HideInInspector] public int Resolution = 4; 24 | [HideInInspector] public bool Smooth = true; 25 | [HideInInspector] public bool RemapVertices = false; 26 | 27 | 28 | private bool _generating = false; 29 | private MeshData _sphereMesh = null; 30 | private MeshFilter _filter = null; 31 | private MeshRenderer _renderer = null; 32 | 33 | 34 | /// 35 | /// Starts the generation of a new mesh, erasing any previous mesh. 36 | /// 37 | public void GenerateMesh() { 38 | if (_generating) { return; } 39 | 40 | if(_filter == null) { 41 | _filter = GetComponent(); 42 | } 43 | if(_renderer == null) { 44 | _renderer = GetComponent(); 45 | } 46 | 47 | _sphereMesh = null; 48 | _generating = true; 49 | 50 | if (Application.isPlaying) { 51 | System.Threading.ThreadPool.QueueUserWorkItem(GenerateSphereMeshThread); 52 | } 53 | else { 54 | GenerateSphereMeshThread(null); 55 | UpdateMesh(); 56 | } 57 | } 58 | 59 | 60 | private void Reset() { 61 | Awake(); 62 | } 63 | 64 | private void Awake() { 65 | _sphereMesh = null; 66 | _generating = false; 67 | 68 | GenerateMesh(); 69 | } 70 | 71 | private void Update() { 72 | if (_generating && _sphereMesh != null) { 73 | UpdateMesh(); 74 | } 75 | } 76 | 77 | private void GenerateSphereMeshThread(object obj) { 78 | if(SphereType == SphereType.uvsphere) { 79 | _sphereMesh = UvSphereBuilder.Generate(Radius, Resolution); 80 | } 81 | else { 82 | IPlatonicSolid baseSolid = GetBaseSolid(SphereType); 83 | _sphereMesh = SphereBuilder.Build(baseSolid, Radius, Resolution, Smooth, RemapVertices); 84 | } 85 | Debug.Log(SphereType.ToString() + " generated: " + _sphereMesh.Triangles.Length + " tris and " + _sphereMesh.Vertices.Length + " verts."); 86 | } 87 | 88 | private IPlatonicSolid GetBaseSolid(SphereType type) { 89 | switch(type) { 90 | case SphereType.tetrasphere: 91 | return new Tetrahedron(); 92 | 93 | case SphereType.cubesphere: 94 | return new Cube(); 95 | 96 | case SphereType.octasphere: 97 | return new Octahedron(); 98 | 99 | case SphereType.dodecasphere: 100 | return new Dodecahedron(); 101 | 102 | case SphereType.icosphere: 103 | return new Icosahedron(); 104 | 105 | case SphereType.uvsphere: 106 | return new UvPolyhedron(); 107 | 108 | default: 109 | return new Icosahedron(); 110 | } 111 | } 112 | 113 | private void UpdateMesh() { 114 | if (!_filter.sharedMesh) { 115 | _filter.sharedMesh = new Mesh(); 116 | } 117 | 118 | _filter.sharedMesh.Clear(); 119 | _filter.sharedMesh.name = SphereType.ToString(); 120 | _filter.sharedMesh.vertices = _sphereMesh.Vertices; 121 | _filter.sharedMesh.triangles = _sphereMesh.Triangles; 122 | _filter.sharedMesh.uv = _sphereMesh.Uv; 123 | _filter.sharedMesh.normals = _sphereMesh.Normals; 124 | _filter.sharedMesh.tangents = _sphereMesh.Tangents; 125 | 126 | if(_renderer.sharedMaterial == null) { 127 | _renderer.sharedMaterial = new Material(Shader.Find("Diffuse")); 128 | } 129 | 130 | _generating = false; 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Icosahedron.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public class Icosahedron : IPlatonicSolid { 9 | public List Vertices { private set; get; } 10 | public List Faces { private set; get; } 11 | public Vector3 NorthPole { private set; get; } 12 | 13 | 14 | public Icosahedron() { 15 | Vertices = CreateStartingVertices(); 16 | Faces = CreateStartingFaces(); 17 | } 18 | 19 | public List RemapVertices(List vertices, List faces) { 20 | // List originalVert = Vertices; 21 | // List checkedFaces = new List(); 22 | // List hexaFaces = new List(); 23 | // PintaFace[] pintaFaces = new PintaFace[12]; 24 | // for(int i = 0; i < pintaFaces.Length; i ++) { 25 | // pintaFaces [i] = new PintaFace(); 26 | // } 27 | 28 | // // first we identify the pinta faces (from the original vertices) 29 | // foreach(var face in faces) { 30 | // if(originalVert.Contains(vertices[face.IndA])) { 31 | // int index = originalVert.IndexOf(vertices[face.IndA]); 32 | // pintaFaces[index].AddFace(face, face.IndA); 33 | // } 34 | // else if(originalVert.Contains(vertices[face.IndB])) { 35 | // int index = originalVert.IndexOf(vertices[face.IndB]); 36 | // pintaFaces[index].AddFace(face, face.IndB); 37 | // } 38 | // else if(originalVert.Contains(vertices[face.IndC])) { 39 | // int index = originalVert.IndexOf(vertices[face.IndC]); 40 | // pintaFaces[index].AddFace(face, face.IndC); 41 | // } 42 | // } 43 | 44 | // // then we identify the hexa faces 45 | // while(checkedFaces.Count < faces.Count) { 46 | // foreach(var face in faces) { 47 | 48 | // } 49 | // } 50 | 51 | return vertices; 52 | } 53 | 54 | 55 | 56 | // create the 12 starting vertices of a icosahedron 57 | private List CreateStartingVertices() { 58 | List startingVert = new List(); 59 | float phi = (1f + Mathf.Sqrt(5f)) / 2f; 60 | 61 | NorthPole = new Vector3(0f, phi, 0f); 62 | 63 | startingVert.Add(new Vector3(-1f, phi, 0f)); 64 | startingVert.Add(new Vector3(1f, phi, 0f)); 65 | startingVert.Add(new Vector3(-1f, -phi, 0f)); 66 | startingVert.Add(new Vector3(1f, -phi, 0f)); 67 | 68 | startingVert.Add(new Vector3(0f, -1f, phi)); 69 | startingVert.Add(new Vector3(0f, 1f, phi)); 70 | startingVert.Add(new Vector3(0f, -1f, -phi)); 71 | startingVert.Add(new Vector3(0f, 1f, -phi)); 72 | 73 | startingVert.Add(new Vector3(phi, 0f, -1f)); 74 | startingVert.Add(new Vector3(phi, 0f, 1f)); 75 | startingVert.Add(new Vector3(-phi, 0f, -1f)); 76 | startingVert.Add(new Vector3(-phi, 0f, 1f)); 77 | 78 | return startingVert; 79 | } 80 | 81 | // create the 20 starting triangle faces of the icosahedron 82 | private List CreateStartingFaces() { 83 | List startingFaces = new List(); 84 | 85 | // 5 faces around point 0 86 | startingFaces.Add(new TriangleFace(0, 11, 5)); 87 | startingFaces.Add(new TriangleFace(0, 5, 1)); 88 | startingFaces.Add(new TriangleFace(0, 1, 7)); 89 | startingFaces.Add(new TriangleFace(0, 7, 10)); 90 | startingFaces.Add(new TriangleFace(0, 10, 11)); 91 | 92 | // 5 adjacent faces 93 | startingFaces.Add(new TriangleFace(1, 5, 9)); 94 | startingFaces.Add(new TriangleFace(5, 11, 4)); 95 | startingFaces.Add(new TriangleFace(11, 10, 2)); 96 | startingFaces.Add(new TriangleFace(10, 7, 6)); 97 | startingFaces.Add(new TriangleFace(7, 1, 8)); 98 | 99 | // 5 faces around point 3 100 | startingFaces.Add(new TriangleFace(3, 9, 4)); 101 | startingFaces.Add(new TriangleFace(3, 4, 2)); 102 | startingFaces.Add(new TriangleFace(3, 2, 6)); 103 | startingFaces.Add(new TriangleFace(3, 6, 8)); 104 | startingFaces.Add(new TriangleFace(3, 8, 9)); 105 | 106 | // 5 adjacent faces 107 | startingFaces.Add(new TriangleFace(4, 9, 5)); 108 | startingFaces.Add(new TriangleFace(2, 4, 11)); 109 | startingFaces.Add(new TriangleFace(6, 2, 10)); 110 | startingFaces.Add(new TriangleFace(8, 6, 7)); 111 | startingFaces.Add(new TriangleFace(9, 8, 1)); 112 | 113 | return startingFaces; 114 | } 115 | 116 | // private class PintaFace { 117 | // public List TriangleFaces { private set; get; } 118 | // public List CenterVerticesIndex { private set; get; } 119 | // public Vector3 Center { set; get; } 120 | 121 | // public PintaFace() { 122 | // TriangleFaces = new List(); 123 | // } 124 | 125 | // public void AddFace(TriangleFace face, int centerVert) { 126 | // if(TriangleFaces.Count >= 5){ 127 | // Debug.LogError("too many face in PintaFace"); 128 | // return; 129 | // } 130 | // TriangleFaces.Add(face); 131 | // CenterVerticesIndex.Add(centerVert); 132 | // } 133 | // } 134 | 135 | // private class HexaFace { 136 | // public List TriangleFaces { private set; get; } 137 | 138 | // public HexaFace() { 139 | // TriangleFaces = new List(); 140 | // } 141 | 142 | // public void AddFace(TriangleFace face) { 143 | // if(TriangleFaces.Count >= 6){ 144 | // Debug.LogError("too many face in PintaFace"); 145 | // return; 146 | // } 147 | // TriangleFaces.Add(face); 148 | // } 149 | // } 150 | } 151 | } 152 | 153 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 2 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 40 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 1 136 | antiAliasing: 4 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Platonics/Dodecahedron.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | public class Dodecahedron : IPlatonicSolid { 9 | public List Vertices { private set; get; } 10 | public List Faces { private set; get; } 11 | public Vector3 NorthPole { private set; get; } 12 | 13 | 14 | public Dodecahedron() { 15 | Vertices = CreateStartingVertices(); 16 | Faces = CreateStartingFaces(); 17 | } 18 | 19 | public List RemapVertices(List vertices, List faces) { 20 | return vertices; 21 | } 22 | 23 | private List CreateStartingVertices() { 24 | List startingVert = new List(); 25 | float phi = (1f + Mathf.Sqrt(5f)) / 2f; 26 | 27 | NorthPole = Vector3.up; 28 | 29 | // center cube coordinates 30 | startingVert.Add(new Vector3(1f, 1f, 1f)); //0 31 | startingVert.Add(new Vector3(-1f, -1f, -1f)); //1 32 | startingVert.Add(new Vector3(-1f, 1f, 1f)); //2 33 | startingVert.Add(new Vector3(1f, -1f, 1f)); //3 34 | startingVert.Add(new Vector3(1f, 1f, -1f)); //4 35 | startingVert.Add(new Vector3(1f, -1f, -1f)); //5 36 | startingVert.Add(new Vector3(-1f, 1f, -1f)); //6 37 | startingVert.Add(new Vector3(-1f, -1f, 1f)); //7 38 | 39 | // yz plane coordinates 40 | startingVert.Add(new Vector3( 0f, 1f/phi, phi)); //8 41 | startingVert.Add(new Vector3( 0f, 1f/phi, -phi)); //9 42 | startingVert.Add(new Vector3( 0f, -1f/phi, phi)); //10 43 | startingVert.Add(new Vector3( 0f, -1f/phi, -phi)); //11 44 | 45 | // xy plnae coordinates 46 | startingVert.Add(new Vector3(1f/phi, phi, 0f)); //12 47 | startingVert.Add(new Vector3(-1f/phi, phi, 0f)); //13 48 | startingVert.Add(new Vector3(1f/phi, -phi, 0f)); //14 49 | startingVert.Add(new Vector3(-1f/phi, -phi, 0f)); //15 50 | 51 | // xz planet coordinates 52 | startingVert.Add(new Vector3(phi, 0f, 1f/phi)); //16 53 | startingVert.Add(new Vector3(-phi, 0f, 1f/phi)); //17 54 | startingVert.Add(new Vector3(phi, 0f, -1f/phi)); //18 55 | startingVert.Add(new Vector3(-phi, 0f, -1f/phi)); //19 56 | 57 | //vertex at the center of each face 58 | // Used these links and a lot of pen and papers 59 | // https://en.wikipedia.org/wiki/Regular_dodecahedron 60 | // https://math.stackexchange.com/questions/2244170/what-are-the-center-co%C3%B6rdinates-of-the-planes-of-a-regular-dodecahedron 61 | Vector3 centerFace1 = (startingVert[12] + startingVert[4] + startingVert[9] + startingVert[6] + startingVert[13]) / 5f; 62 | Vector3 centerFace2 = (startingVert[12] + startingVert[13] + startingVert[2] + startingVert[8] + startingVert[0]) / 5f; 63 | Vector3 centerFace3 = (startingVert[12] + startingVert[0] + startingVert[16] + startingVert[18] + startingVert[4]) / 5f; 64 | Vector3 centerFace4 = (startingVert[9] + startingVert[4] + startingVert[18] + startingVert[5] + startingVert[11]) / 5f; 65 | Vector3 centerFace5 = (startingVert[6] + startingVert[9] + startingVert[11] + startingVert[1] + startingVert[19]) / 5f; 66 | Vector3 centerFace6 = (startingVert[13] + startingVert[6] + startingVert[19] + startingVert[17] + startingVert[2]) / 5f; 67 | 68 | Vector3 centerFace7 = (startingVert[17] + startingVert[19] + startingVert[1] + startingVert[15] + startingVert[7]) / 5f; 69 | Vector3 centerFace8 = (startingVert[14] + startingVert[15] + startingVert[1] + startingVert[11] + startingVert[5]) / 5f; 70 | Vector3 centerFace9 = (startingVert[14] + startingVert[5] + startingVert[18] + startingVert[16] + startingVert[3]) / 5f; 71 | Vector3 centerFace10 = (startingVert[3] + startingVert[16] + startingVert[0] + startingVert[8] + startingVert[10]) / 5f; 72 | Vector3 centerFace11 = (startingVert[10] + startingVert[8] + startingVert[2] + startingVert[17] + startingVert[7]) / 5f; 73 | Vector3 centerFace12 = (startingVert[15] + startingVert[14] + startingVert[3] + startingVert[10] + startingVert[7]) / 5f; 74 | 75 | startingVert.Add(centerFace1); //20 76 | startingVert.Add(centerFace2); //21 77 | startingVert.Add(centerFace3); //22 78 | startingVert.Add(centerFace4); //23 79 | startingVert.Add(centerFace5); //24 80 | startingVert.Add(centerFace6); //25 81 | startingVert.Add(centerFace7); //26 82 | startingVert.Add(centerFace8); //27 83 | startingVert.Add(centerFace9); //28 84 | startingVert.Add(centerFace10); //29 85 | startingVert.Add(centerFace11); //30 86 | startingVert.Add(centerFace12); //31 87 | 88 | return startingVert; 89 | } 90 | 91 | private List CreateStartingFaces() { 92 | List startingFaces = new List(); 93 | 94 | // face 1 95 | startingFaces.Add(new TriangleFace(20, 13, 12)); 96 | startingFaces.Add(new TriangleFace(20, 12, 4)); 97 | startingFaces.Add(new TriangleFace(20, 4, 9)); 98 | startingFaces.Add(new TriangleFace(20, 9, 6)); 99 | startingFaces.Add(new TriangleFace(20, 6, 13)); 100 | 101 | // face 2 102 | startingFaces.Add(new TriangleFace(21, 13, 2)); 103 | startingFaces.Add(new TriangleFace(21, 2, 8)); 104 | startingFaces.Add(new TriangleFace(21, 8, 0)); 105 | startingFaces.Add(new TriangleFace(21, 0, 12)); 106 | startingFaces.Add(new TriangleFace(21, 12, 13)); 107 | 108 | // face 3 109 | startingFaces.Add(new TriangleFace(22, 12, 0)); 110 | startingFaces.Add(new TriangleFace(22, 0, 16)); 111 | startingFaces.Add(new TriangleFace(22, 16, 18)); 112 | startingFaces.Add(new TriangleFace(22, 18, 4)); 113 | startingFaces.Add(new TriangleFace(22, 4, 12)); 114 | 115 | // face 4 116 | startingFaces.Add(new TriangleFace(23, 4, 18)); 117 | startingFaces.Add(new TriangleFace(23, 18, 5)); 118 | startingFaces.Add(new TriangleFace(23, 5, 11)); 119 | startingFaces.Add(new TriangleFace(23, 11, 9)); 120 | startingFaces.Add(new TriangleFace(23, 9, 4)); 121 | 122 | // face 5 123 | startingFaces.Add(new TriangleFace(24, 9, 11)); 124 | startingFaces.Add(new TriangleFace(24, 11, 1)); 125 | startingFaces.Add(new TriangleFace(24, 1, 19)); 126 | startingFaces.Add(new TriangleFace(24, 19, 6)); 127 | startingFaces.Add(new TriangleFace(24, 6, 9)); 128 | 129 | // face 6 130 | startingFaces.Add(new TriangleFace(25, 6, 19)); 131 | startingFaces.Add(new TriangleFace(25, 19, 17)); 132 | startingFaces.Add(new TriangleFace(25, 17, 2)); 133 | startingFaces.Add(new TriangleFace(25, 2, 13)); 134 | startingFaces.Add(new TriangleFace(25, 13, 6)); 135 | 136 | // face 7 137 | startingFaces.Add(new TriangleFace(26, 7, 17)); 138 | startingFaces.Add(new TriangleFace(26, 17, 19)); 139 | startingFaces.Add(new TriangleFace(26, 19, 1)); 140 | startingFaces.Add(new TriangleFace(26, 1, 15)); 141 | startingFaces.Add(new TriangleFace(26, 15, 7)); 142 | 143 | // face 8 144 | startingFaces.Add(new TriangleFace(27, 15, 1)); 145 | startingFaces.Add(new TriangleFace(27, 1, 11)); 146 | startingFaces.Add(new TriangleFace(27, 11, 5)); 147 | startingFaces.Add(new TriangleFace(27, 5, 14)); 148 | startingFaces.Add(new TriangleFace(27, 14, 15)); 149 | 150 | // face 9 151 | startingFaces.Add(new TriangleFace(28, 14, 5)); 152 | startingFaces.Add(new TriangleFace(28, 5, 18)); 153 | startingFaces.Add(new TriangleFace(28, 18, 16)); 154 | startingFaces.Add(new TriangleFace(28, 16, 3)); 155 | startingFaces.Add(new TriangleFace(28, 3, 14)); 156 | 157 | // face 10 158 | startingFaces.Add(new TriangleFace(29, 3, 16)); 159 | startingFaces.Add(new TriangleFace(29, 16, 0)); 160 | startingFaces.Add(new TriangleFace(29, 0, 8)); 161 | startingFaces.Add(new TriangleFace(29, 8, 10)); 162 | startingFaces.Add(new TriangleFace(29, 10, 3)); 163 | 164 | // face 11 165 | startingFaces.Add(new TriangleFace(30, 10, 8)); 166 | startingFaces.Add(new TriangleFace(30, 8, 2)); 167 | startingFaces.Add(new TriangleFace(30, 2, 17)); 168 | startingFaces.Add(new TriangleFace(30, 17, 7)); 169 | startingFaces.Add(new TriangleFace(30, 7, 10)); 170 | 171 | // face 12 172 | startingFaces.Add(new TriangleFace(31, 15, 14)); 173 | startingFaces.Add(new TriangleFace(31, 14, 3)); 174 | startingFaces.Add(new TriangleFace(31, 3, 10)); 175 | startingFaces.Add(new TriangleFace(31, 10, 7)); 176 | startingFaces.Add(new TriangleFace(31, 7, 15)); 177 | 178 | return startingFaces; 179 | } 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /Assets/SphereGenerator/Scripts/Builders/SphereBuilder.cs: -------------------------------------------------------------------------------- 1 | // Original source: https://github.com/alexisgea/sphere_generator and post: https://www.alexisgiard.com/icosahedron-sphere-remastered/ 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace AlexisGea { 8 | /// 9 | /// Factory class to build a UV sphere (a warped uv plane). 10 | /// 11 | public static class SphereBuilder { 12 | /// 13 | /// Generate a UV sphere. 14 | /// 15 | /// Number of latitude lines (vertices on the y axis). 16 | public static MeshData Build(IPlatonicSolid platonic, float radius, int resolution, bool smooth, bool remapVertices) { 17 | 18 | List vertices = new List(); 19 | List< int > triangles = new List(); 20 | List faces = new List(); 21 | Dictionary middlePointIndexCache = new Dictionary(); 22 | Dictionary vertWithWarpedU = new Dictionary(); 23 | Dictionary poleVertIndicesCorrectU = new Dictionary(); 24 | 25 | Vector2[] uv; 26 | Vector3[] normals; 27 | Vector4[] tangents; 28 | 29 | Vector4 tangent = new Vector4(1f, 0f, 0f, -1f); 30 | 31 | // create the base cube primitive 32 | vertices = platonic.Vertices; 33 | faces = platonic.Faces; 34 | 35 | // subdivide the triangles faces 36 | for (int i = 1; i < resolution; i++) { 37 | List newFaces = new List(); 38 | foreach (var tri in faces) { 39 | // replace triangle by 4 triangles 40 | int a = GetMiddlePoint(tri.IndA, tri.IndB, ref vertices, ref middlePointIndexCache); 41 | int b = GetMiddlePoint(tri.IndB, tri.IndC, ref vertices, ref middlePointIndexCache); 42 | int c = GetMiddlePoint(tri.IndC, tri.IndA, ref vertices, ref middlePointIndexCache); 43 | 44 | newFaces.Add(new TriangleFace(tri.IndA, a, c)); 45 | newFaces.Add(new TriangleFace(tri.IndB, b, a)); 46 | newFaces.Add(new TriangleFace(tri.IndC, c, b)); 47 | newFaces.Add(new TriangleFace(a, b, c)); 48 | } 49 | faces = newFaces; 50 | } 51 | 52 | // fix warped uv on seam 53 | vertWithWarpedU = FindAndFixeWarpedFaces(ref faces, ref vertices); 54 | poleVertIndicesCorrectU = FindAndFixPoleVertices(platonic, ref faces, ref vertices); 55 | 56 | // makes unique vertice to have a non smooth sphere 57 | if(!smooth) { 58 | MakeVerticesUnique(ref faces, ref vertices, ref vertWithWarpedU, ref poleVertIndicesCorrectU); 59 | } 60 | 61 | // create mesh triangles 62 | for( int i = 0; i < faces.Count; i++ ) { 63 | triangles.Add(faces[i].IndA); 64 | triangles.Add(faces[i].IndB); 65 | triangles.Add(faces[i].IndC); 66 | } 67 | 68 | if(remapVertices) { 69 | vertices = platonic.RemapVertices(vertices, faces); 70 | } 71 | 72 | // generate uv, normals, and tangents 73 | uv = new Vector2[vertices.Count]; 74 | normals = new Vector3[vertices.Count]; 75 | tangents = new Vector4[vertices.Count]; 76 | 77 | for(int i = 0; i < vertices.Count; i++) { 78 | Vector3 normal = vertices[i].normalized; 79 | float u = (Mathf.Atan2(normal.z, normal.x) / (2f * Mathf.PI)) + 0.5f; // remove the 0.5f 80 | float v = (Mathf.Asin(normal.y) / Mathf.PI) + 0.5f; 81 | 82 | vertices[i] = normal * radius; 83 | 84 | // correct uv issues 85 | if(poleVertIndicesCorrectU.ContainsKey(i)) { 86 | u = poleVertIndicesCorrectU[i]; 87 | } 88 | 89 | if(vertWithWarpedU.ContainsValue(i)) { 90 | u += 1; 91 | } 92 | 93 | if(vertWithWarpedU.ContainsValue(i) && poleVertIndicesCorrectU.ContainsKey(i)) { 94 | u -= 0.5f; // found through trial and error, it was working so I had to remove the 0.5 added when recalculating 95 | } 96 | 97 | uv[i] = new Vector2(u, v); 98 | normals[i] = normal; 99 | tangents[i] = tangent; 100 | } 101 | 102 | // recompute normals 103 | if(!smooth) { 104 | foreach(TriangleFace face in faces) { 105 | Vector3 normal = GetFaceCenter(face, vertices); 106 | normals[face.IndA] = normal; 107 | normals[face.IndB] = normal; 108 | normals[face.IndC] = normal; 109 | } 110 | } 111 | 112 | return new MeshData(vertices.ToArray(), triangles.ToArray(), uv, normals, tangents); 113 | } 114 | 115 | 116 | // return index of point in the middle of p1 and p2 117 | private static int GetMiddlePoint(int p1, int p2, ref List vertices, ref Dictionary cache) { 118 | // first check if we have it already 119 | bool firstIsSmaller = p1 < p2; 120 | long smallerIndex = firstIsSmaller ? p1 : p2; 121 | long greaterIndex = firstIsSmaller ? p2 : p1; 122 | long key = (smallerIndex << 32) + greaterIndex; 123 | 124 | int ret; 125 | if (cache.TryGetValue(key, out ret)) 126 | { 127 | return ret; 128 | } 129 | 130 | // not in cache, calculate it 131 | Vector3 point1 = vertices[p1]; 132 | Vector3 point2 = vertices[p2]; 133 | Vector3 middle = new Vector3 134 | ( 135 | (point1.x + point2.x) / 2f, 136 | (point1.y + point2.y) / 2f, 137 | (point1.z + point2.z) / 2f 138 | ); 139 | 140 | // add vertex makes sure point is on unit sphere 141 | int i = vertices.Count; 142 | vertices.Add(middle); 143 | 144 | // store it, return index 145 | cache.Add(key, i); 146 | 147 | return i; 148 | } 149 | 150 | private static Dictionary FindAndFixeWarpedFaces(ref List faces, ref List vertices) { 151 | List warpedFaces = new List(); 152 | Dictionary checkedVert = new Dictionary(); 153 | 154 | // find warped faces 155 | foreach(TriangleFace face in faces) { 156 | Vector3 coordA = GetUvCoordinates(vertices[face.IndA]); 157 | Vector3 coordB = GetUvCoordinates(vertices[face.IndB]); 158 | Vector3 coordC = GetUvCoordinates(vertices[face.IndC]); 159 | 160 | Vector3 texNormal = Vector3.Cross(coordB - coordA, coordC - coordA); 161 | if (texNormal.z > 0) { 162 | warpedFaces.Add(face); 163 | } 164 | } 165 | 166 | // fix warped faces 167 | foreach(TriangleFace wFace in warpedFaces) { 168 | float xCoordA = GetUvCoordinates(vertices[wFace.IndA]).x; 169 | float xCoordB = GetUvCoordinates(vertices[wFace.IndB]).x; 170 | float xCoordC = GetUvCoordinates(vertices[wFace.IndC]).x; 171 | 172 | if(xCoordA < 0.25f) { 173 | int newIa = wFace.IndA; 174 | if(!checkedVert.TryGetValue(wFace.IndA, out newIa)){ 175 | vertices.Add(vertices[wFace.IndA]); 176 | checkedVert[wFace.IndA] = vertices.Count - 1; 177 | newIa = vertices.Count - 1; 178 | } 179 | wFace.SetIndA(newIa); 180 | } 181 | if(xCoordB < 0.25f) { 182 | int newIb = wFace.IndB; 183 | if(!checkedVert.TryGetValue(wFace.IndB, out newIb)){ 184 | vertices.Add(vertices[wFace.IndB]); 185 | checkedVert[wFace.IndB] = vertices.Count - 1; 186 | newIb = vertices.Count - 1; 187 | } 188 | wFace.SetIndB(newIb); 189 | } 190 | if(xCoordC < 0.25f) { 191 | int newIc = wFace.IndC; 192 | if(!checkedVert.TryGetValue(wFace.IndC, out newIc)){ 193 | vertices.Add(vertices[wFace.IndC]); 194 | checkedVert[wFace.IndC] = vertices.Count - 1; 195 | newIc = vertices.Count - 1; 196 | } 197 | wFace.SetIndC(newIc); 198 | } 199 | } 200 | 201 | return checkedVert; 202 | } 203 | 204 | //fix pole vertices incorrect U 205 | private static Dictionary FindAndFixPoleVertices(IPlatonicSolid solid, ref List faces, ref List vertices) { 206 | Vector3 north = solid.NorthPole; 207 | Vector3 south = -solid.NorthPole; 208 | 209 | List poleVerticeInd = new List(); 210 | Dictionary poleVertIndicesCorrectU = new Dictionary(); 211 | 212 | foreach(TriangleFace face in faces) { 213 | if(vertices[face.IndA] == north || vertices[face.IndA] == south) { 214 | if(!poleVerticeInd.Contains(face.IndA)) { 215 | poleVerticeInd.Add(face.IndA); 216 | } 217 | else { 218 | vertices.Add(vertices[face.IndA] == north ? north : south); 219 | face.SetIndA(vertices.Count - 1); 220 | } 221 | float xCoordB = GetUvCoordinates(vertices[face.IndB]).x; 222 | float xCoordC = GetUvCoordinates(vertices[face.IndC]).x; 223 | float correctedU = (xCoordB + xCoordC) / 2f + 0.5f; // I am not sure why it is needed but it seems needed... 224 | 225 | poleVertIndicesCorrectU[face.IndA] = correctedU; 226 | } 227 | } 228 | 229 | return poleVertIndicesCorrectU; 230 | } 231 | 232 | private static Vector3 GetFaceCenter(TriangleFace face, List vertices) { 233 | return (vertices[face.IndA] + vertices[face.IndB] + vertices[face.IndC]) / 3f; 234 | } 235 | 236 | private static Vector2 GetUvCoordinates(Vector3 vertice) { 237 | Vector3 vertCoord = vertice.normalized; 238 | float u = (Mathf.Atan2(vertCoord.z,vertCoord.x) / (2f * Mathf.PI)); 239 | float v = (Mathf.Asin(vertCoord.y) / Mathf.PI) + 0.5f; 240 | 241 | return new Vector2(u, v); 242 | } 243 | 244 | private static void MakeVerticesUnique(ref List faces, ref List vertices, 245 | ref Dictionary vertWithWarpedU, ref Dictionary poleVertIndicesCorrectU) { 246 | List vertCache = new List(); 247 | foreach(TriangleFace face in faces) { 248 | if(vertCache.Contains(face.IndA)) { 249 | Vector3 newVert = vertices[face.IndA]; 250 | vertices.Add(newVert); 251 | 252 | if(vertWithWarpedU.ContainsValue(face.IndA)) { 253 | vertWithWarpedU[vertices.Count - 1] = vertices.Count - 1; 254 | } 255 | 256 | if(poleVertIndicesCorrectU.ContainsKey(face.IndA)) { 257 | poleVertIndicesCorrectU[vertices.Count -1] = poleVertIndicesCorrectU[face.IndA]; 258 | } 259 | 260 | face.SetIndA(vertices.Count - 1); 261 | } 262 | 263 | if(vertCache.Contains(face.IndB)) { 264 | Vector3 newVert = vertices[face.IndB]; 265 | vertices.Add(newVert); 266 | 267 | if(vertWithWarpedU.ContainsValue(face.IndB)) { 268 | vertWithWarpedU[vertices.Count - 1] = vertices.Count - 1; 269 | } 270 | 271 | if(poleVertIndicesCorrectU.ContainsKey(face.IndB)) { 272 | poleVertIndicesCorrectU[vertices.Count -1] = poleVertIndicesCorrectU[face.IndB]; 273 | } 274 | 275 | face.SetIndB(vertices.Count - 1); 276 | } 277 | 278 | if(vertCache.Contains(face.IndC)) { 279 | Vector3 newVert = vertices[face.IndC]; 280 | vertices.Add(newVert); 281 | 282 | if(vertWithWarpedU.ContainsValue(face.IndC)) { 283 | vertWithWarpedU[vertices.Count - 1] = vertices.Count - 1; 284 | } 285 | 286 | if(poleVertIndicesCorrectU.ContainsKey(face.IndC)) { 287 | poleVertIndicesCorrectU[vertices.Count -1] = poleVertIndicesCorrectU[face.IndC]; 288 | } 289 | 290 | face.SetIndC(vertices.Count - 1); 291 | } 292 | 293 | vertCache.Add(face.IndA); 294 | vertCache.Add(face.IndB); 295 | vertCache.Add(face.IndC); 296 | } 297 | } 298 | } 299 | } 300 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | productGUID: 21443ca3f1a153944baba7f494af15f3 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: Icosphere Demo 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | tizenShowActivityIndicatorOnLoading: -1 56 | iosAppInBackgroundBehavior: 0 57 | displayResolutionDialog: 1 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidBlitType: 0 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 1 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.games 84 | gpuSkinning: 1 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | fullscreenMode: 1 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | n3dsDisableStereoscopicView: 0 101 | n3dsEnableSharedListOpt: 1 102 | n3dsEnableVSync: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | m_SupportedAspectRatios: 115 | 4:3: 1 116 | 5:4: 1 117 | 16:10: 1 118 | 16:9: 1 119 | Others: 1 120 | bundleVersion: 0.1 121 | preloadedAssets: [] 122 | metroInputSource: 0 123 | wsaTransparentSwapchain: 0 124 | m_HolographicPauseOnTrackingLoss: 1 125 | xboxOneDisableKinectGpuReservation: 0 126 | xboxOneEnable7thCore: 0 127 | vrSettings: 128 | cardboard: 129 | depthFormat: 0 130 | enableTransitionView: 0 131 | daydream: 132 | depthFormat: 0 133 | useSustainedPerformanceMode: 0 134 | enableVideoLayer: 0 135 | useProtectedVideoMemory: 0 136 | minimumSupportedHeadTracking: 0 137 | maximumSupportedHeadTracking: 1 138 | hololens: 139 | depthFormat: 1 140 | depthBufferSharingEnabled: 0 141 | enable360StereoCapture: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | protectGraphicsMemory: 0 146 | useHDRDisplay: 0 147 | m_ColorGamuts: 00000000 148 | targetPixelDensity: 30 149 | resolutionScalingMode: 0 150 | androidSupportedAspectRatio: 1 151 | androidMaxAspectRatio: 2.1 152 | applicationIdentifier: {} 153 | buildNumber: {} 154 | AndroidBundleVersionCode: 1 155 | AndroidMinSdkVersion: 16 156 | AndroidTargetSdkVersion: 0 157 | AndroidPreferredInstallLocation: 1 158 | aotOptions: 159 | stripEngineCode: 1 160 | iPhoneStrippingLevel: 0 161 | iPhoneScriptCallOptimization: 0 162 | ForceInternetPermission: 0 163 | ForceSDCardPermission: 0 164 | CreateWallpaper: 0 165 | APKExpansionFiles: 0 166 | keepLoadedShadersAlive: 0 167 | StripUnusedMeshComponents: 1 168 | VertexChannelCompressionMask: 4054 169 | iPhoneSdkVersion: 988 170 | iOSTargetOSVersionString: 8.0 171 | tvOSSdkVersion: 0 172 | tvOSRequireExtendedGameController: 0 173 | tvOSTargetOSVersionString: 9.0 174 | uIPrerenderedIcon: 0 175 | uIRequiresPersistentWiFi: 0 176 | uIRequiresFullScreen: 1 177 | uIStatusBarHidden: 1 178 | uIExitOnSuspend: 0 179 | uIStatusBarStyle: 0 180 | iPhoneSplashScreen: {fileID: 0} 181 | iPhoneHighResSplashScreen: {fileID: 0} 182 | iPhoneTallHighResSplashScreen: {fileID: 0} 183 | iPhone47inSplashScreen: {fileID: 0} 184 | iPhone55inPortraitSplashScreen: {fileID: 0} 185 | iPhone55inLandscapeSplashScreen: {fileID: 0} 186 | iPhone58inPortraitSplashScreen: {fileID: 0} 187 | iPhone58inLandscapeSplashScreen: {fileID: 0} 188 | iPadPortraitSplashScreen: {fileID: 0} 189 | iPadHighResPortraitSplashScreen: {fileID: 0} 190 | iPadLandscapeSplashScreen: {fileID: 0} 191 | iPadHighResLandscapeSplashScreen: {fileID: 0} 192 | appleTVSplashScreen: {fileID: 0} 193 | appleTVSplashScreen2x: {fileID: 0} 194 | tvOSSmallIconLayers: [] 195 | tvOSSmallIconLayers2x: [] 196 | tvOSLargeIconLayers: [] 197 | tvOSLargeIconLayers2x: [] 198 | tvOSTopShelfImageLayers: [] 199 | tvOSTopShelfImageLayers2x: [] 200 | tvOSTopShelfImageWideLayers: [] 201 | tvOSTopShelfImageWideLayers2x: [] 202 | iOSLaunchScreenType: 0 203 | iOSLaunchScreenPortrait: {fileID: 0} 204 | iOSLaunchScreenLandscape: {fileID: 0} 205 | iOSLaunchScreenBackgroundColor: 206 | serializedVersion: 2 207 | rgba: 0 208 | iOSLaunchScreenFillPct: 100 209 | iOSLaunchScreenSize: 100 210 | iOSLaunchScreenCustomXibPath: 211 | iOSLaunchScreeniPadType: 0 212 | iOSLaunchScreeniPadImage: {fileID: 0} 213 | iOSLaunchScreeniPadBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreeniPadFillPct: 100 217 | iOSLaunchScreeniPadSize: 100 218 | iOSLaunchScreeniPadCustomXibPath: 219 | iOSUseLaunchScreenStoryboard: 0 220 | iOSLaunchScreenCustomStoryboardPath: 221 | iOSDeviceRequirements: [] 222 | iOSURLSchemes: [] 223 | iOSBackgroundModes: 0 224 | iOSMetalForceHardShadows: 0 225 | metalEditorSupport: 1 226 | metalAPIValidation: 1 227 | iOSRenderExtraFrameOnPause: 0 228 | appleDeveloperTeamID: 229 | iOSManualSigningProvisioningProfileID: 230 | tvOSManualSigningProvisioningProfileID: 231 | iOSManualSigningProvisioningProfileType: 0 232 | tvOSManualSigningProvisioningProfileType: 0 233 | appleEnableAutomaticSigning: 0 234 | iOSRequireARKit: 0 235 | appleEnableProMotion: 0 236 | clonedFromGUID: 56e7a2d3a00f33d44bdd161b773c35b5 237 | templatePackageId: com.unity.template.3d@1.0.0 238 | templateDefaultScene: Assets/Scenes/SampleScene.unity 239 | AndroidTargetArchitectures: 5 240 | AndroidSplashScreenScale: 0 241 | androidSplashScreen: {fileID: 0} 242 | AndroidKeystoreName: 243 | AndroidKeyaliasName: 244 | AndroidTVCompatibility: 1 245 | AndroidIsGame: 1 246 | AndroidEnableTango: 0 247 | androidEnableBanner: 1 248 | androidUseLowAccuracyLocation: 0 249 | m_AndroidBanners: 250 | - width: 320 251 | height: 180 252 | banner: {fileID: 0} 253 | androidGamepadSupportLevel: 0 254 | resolutionDialogBanner: {fileID: 0} 255 | m_BuildTargetIcons: [] 256 | m_BuildTargetPlatformIcons: [] 257 | m_BuildTargetBatching: 258 | - m_BuildTarget: Standalone 259 | m_StaticBatching: 1 260 | m_DynamicBatching: 0 261 | - m_BuildTarget: tvOS 262 | m_StaticBatching: 1 263 | m_DynamicBatching: 0 264 | - m_BuildTarget: Android 265 | m_StaticBatching: 1 266 | m_DynamicBatching: 0 267 | - m_BuildTarget: iPhone 268 | m_StaticBatching: 1 269 | m_DynamicBatching: 0 270 | - m_BuildTarget: WebGL 271 | m_StaticBatching: 0 272 | m_DynamicBatching: 0 273 | m_BuildTargetGraphicsAPIs: 274 | - m_BuildTarget: AndroidPlayer 275 | m_APIs: 0b00000015000000 276 | m_Automatic: 1 277 | - m_BuildTarget: iOSSupport 278 | m_APIs: 10000000 279 | m_Automatic: 1 280 | - m_BuildTarget: AppleTVSupport 281 | m_APIs: 10000000 282 | m_Automatic: 0 283 | - m_BuildTarget: WebGLSupport 284 | m_APIs: 0b000000 285 | m_Automatic: 1 286 | m_BuildTargetVRSettings: 287 | - m_BuildTarget: Standalone 288 | m_Enabled: 0 289 | m_Devices: 290 | - Oculus 291 | - OpenVR 292 | m_BuildTargetEnableVuforiaSettings: [] 293 | openGLRequireES31: 0 294 | openGLRequireES31AEP: 0 295 | m_TemplateCustomTags: {} 296 | mobileMTRendering: 297 | Android: 1 298 | iPhone: 1 299 | tvOS: 1 300 | m_BuildTargetGroupLightmapEncodingQuality: [] 301 | playModeTestRunnerEnabled: 0 302 | runPlayModeTestAsEditModeTest: 0 303 | actionOnDotNetUnhandledException: 1 304 | enableInternalProfiler: 0 305 | logObjCUncaughtExceptions: 1 306 | enableCrashReportAPI: 0 307 | cameraUsageDescription: 308 | locationUsageDescription: 309 | microphoneUsageDescription: 310 | switchNetLibKey: 311 | switchSocketMemoryPoolSize: 6144 312 | switchSocketAllocatorPoolSize: 128 313 | switchSocketConcurrencyLimit: 14 314 | switchScreenResolutionBehavior: 2 315 | switchUseCPUProfiler: 0 316 | switchApplicationID: 0x01004b9000490000 317 | switchNSODependencies: 318 | switchTitleNames_0: 319 | switchTitleNames_1: 320 | switchTitleNames_2: 321 | switchTitleNames_3: 322 | switchTitleNames_4: 323 | switchTitleNames_5: 324 | switchTitleNames_6: 325 | switchTitleNames_7: 326 | switchTitleNames_8: 327 | switchTitleNames_9: 328 | switchTitleNames_10: 329 | switchTitleNames_11: 330 | switchTitleNames_12: 331 | switchTitleNames_13: 332 | switchTitleNames_14: 333 | switchPublisherNames_0: 334 | switchPublisherNames_1: 335 | switchPublisherNames_2: 336 | switchPublisherNames_3: 337 | switchPublisherNames_4: 338 | switchPublisherNames_5: 339 | switchPublisherNames_6: 340 | switchPublisherNames_7: 341 | switchPublisherNames_8: 342 | switchPublisherNames_9: 343 | switchPublisherNames_10: 344 | switchPublisherNames_11: 345 | switchPublisherNames_12: 346 | switchPublisherNames_13: 347 | switchPublisherNames_14: 348 | switchIcons_0: {fileID: 0} 349 | switchIcons_1: {fileID: 0} 350 | switchIcons_2: {fileID: 0} 351 | switchIcons_3: {fileID: 0} 352 | switchIcons_4: {fileID: 0} 353 | switchIcons_5: {fileID: 0} 354 | switchIcons_6: {fileID: 0} 355 | switchIcons_7: {fileID: 0} 356 | switchIcons_8: {fileID: 0} 357 | switchIcons_9: {fileID: 0} 358 | switchIcons_10: {fileID: 0} 359 | switchIcons_11: {fileID: 0} 360 | switchIcons_12: {fileID: 0} 361 | switchIcons_13: {fileID: 0} 362 | switchIcons_14: {fileID: 0} 363 | switchSmallIcons_0: {fileID: 0} 364 | switchSmallIcons_1: {fileID: 0} 365 | switchSmallIcons_2: {fileID: 0} 366 | switchSmallIcons_3: {fileID: 0} 367 | switchSmallIcons_4: {fileID: 0} 368 | switchSmallIcons_5: {fileID: 0} 369 | switchSmallIcons_6: {fileID: 0} 370 | switchSmallIcons_7: {fileID: 0} 371 | switchSmallIcons_8: {fileID: 0} 372 | switchSmallIcons_9: {fileID: 0} 373 | switchSmallIcons_10: {fileID: 0} 374 | switchSmallIcons_11: {fileID: 0} 375 | switchSmallIcons_12: {fileID: 0} 376 | switchSmallIcons_13: {fileID: 0} 377 | switchSmallIcons_14: {fileID: 0} 378 | switchManualHTML: 379 | switchAccessibleURLs: 380 | switchLegalInformation: 381 | switchMainThreadStackSize: 1048576 382 | switchPresenceGroupId: 383 | switchLogoHandling: 0 384 | switchReleaseVersion: 0 385 | switchDisplayVersion: 1.0.0 386 | switchStartupUserAccount: 0 387 | switchTouchScreenUsage: 0 388 | switchSupportedLanguagesMask: 0 389 | switchLogoType: 0 390 | switchApplicationErrorCodeCategory: 391 | switchUserAccountSaveDataSize: 0 392 | switchUserAccountSaveDataJournalSize: 0 393 | switchApplicationAttribute: 0 394 | switchCardSpecSize: -1 395 | switchCardSpecClock: -1 396 | switchRatingsMask: 0 397 | switchRatingsInt_0: 0 398 | switchRatingsInt_1: 0 399 | switchRatingsInt_2: 0 400 | switchRatingsInt_3: 0 401 | switchRatingsInt_4: 0 402 | switchRatingsInt_5: 0 403 | switchRatingsInt_6: 0 404 | switchRatingsInt_7: 0 405 | switchRatingsInt_8: 0 406 | switchRatingsInt_9: 0 407 | switchRatingsInt_10: 0 408 | switchRatingsInt_11: 0 409 | switchLocalCommunicationIds_0: 410 | switchLocalCommunicationIds_1: 411 | switchLocalCommunicationIds_2: 412 | switchLocalCommunicationIds_3: 413 | switchLocalCommunicationIds_4: 414 | switchLocalCommunicationIds_5: 415 | switchLocalCommunicationIds_6: 416 | switchLocalCommunicationIds_7: 417 | switchParentalControl: 0 418 | switchAllowsScreenshot: 1 419 | switchAllowsVideoCapturing: 1 420 | switchAllowsRuntimeAddOnContentInstall: 0 421 | switchDataLossConfirmation: 0 422 | switchSupportedNpadStyles: 3 423 | switchNativeFsCacheSize: 32 424 | switchSocketConfigEnabled: 0 425 | switchTcpInitialSendBufferSize: 32 426 | switchTcpInitialReceiveBufferSize: 64 427 | switchTcpAutoSendBufferSizeMax: 256 428 | switchTcpAutoReceiveBufferSizeMax: 256 429 | switchUdpSendBufferSize: 9 430 | switchUdpReceiveBufferSize: 42 431 | switchSocketBufferEfficiency: 4 432 | switchSocketInitializeEnabled: 1 433 | switchNetworkInterfaceManagerInitializeEnabled: 1 434 | switchPlayerConnectionEnabled: 1 435 | ps4NPAgeRating: 12 436 | ps4NPTitleSecret: 437 | ps4NPTrophyPackPath: 438 | ps4ParentalLevel: 11 439 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 440 | ps4Category: 0 441 | ps4MasterVersion: 01.00 442 | ps4AppVersion: 01.00 443 | ps4AppType: 0 444 | ps4ParamSfxPath: 445 | ps4VideoOutPixelFormat: 0 446 | ps4VideoOutInitialWidth: 1920 447 | ps4VideoOutBaseModeInitialWidth: 1920 448 | ps4VideoOutReprojectionRate: 60 449 | ps4PronunciationXMLPath: 450 | ps4PronunciationSIGPath: 451 | ps4BackgroundImagePath: 452 | ps4StartupImagePath: 453 | ps4StartupImagesFolder: 454 | ps4IconImagesFolder: 455 | ps4SaveDataImagePath: 456 | ps4SdkOverride: 457 | ps4BGMPath: 458 | ps4ShareFilePath: 459 | ps4ShareOverlayImagePath: 460 | ps4PrivacyGuardImagePath: 461 | ps4NPtitleDatPath: 462 | ps4RemotePlayKeyAssignment: -1 463 | ps4RemotePlayKeyMappingDir: 464 | ps4PlayTogetherPlayerCount: 0 465 | ps4EnterButtonAssignment: 1 466 | ps4ApplicationParam1: 0 467 | ps4ApplicationParam2: 0 468 | ps4ApplicationParam3: 0 469 | ps4ApplicationParam4: 0 470 | ps4DownloadDataSize: 0 471 | ps4GarlicHeapSize: 2048 472 | ps4ProGarlicHeapSize: 2560 473 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 474 | ps4pnSessions: 1 475 | ps4pnPresence: 1 476 | ps4pnFriends: 1 477 | ps4pnGameCustomData: 1 478 | playerPrefsSupport: 0 479 | enableApplicationExit: 0 480 | restrictedAudioUsageRights: 0 481 | ps4UseResolutionFallback: 0 482 | ps4ReprojectionSupport: 0 483 | ps4UseAudio3dBackend: 0 484 | ps4SocialScreenEnabled: 0 485 | ps4ScriptOptimizationLevel: 0 486 | ps4Audio3dVirtualSpeakerCount: 14 487 | ps4attribCpuUsage: 0 488 | ps4PatchPkgPath: 489 | ps4PatchLatestPkgPath: 490 | ps4PatchChangeinfoPath: 491 | ps4PatchDayOne: 0 492 | ps4attribUserManagement: 0 493 | ps4attribMoveSupport: 0 494 | ps4attrib3DSupport: 0 495 | ps4attribShareSupport: 0 496 | ps4attribExclusiveVR: 0 497 | ps4disableAutoHideSplash: 0 498 | ps4videoRecordingFeaturesUsed: 0 499 | ps4contentSearchFeaturesUsed: 0 500 | ps4attribEyeToEyeDistanceSettingVR: 0 501 | ps4IncludedModules: [] 502 | monoEnv: 503 | psp2Splashimage: {fileID: 0} 504 | psp2NPTrophyPackPath: 505 | psp2NPSupportGBMorGJP: 0 506 | psp2NPAgeRating: 12 507 | psp2NPTitleDatPath: 508 | psp2NPCommsID: 509 | psp2NPCommunicationsID: 510 | psp2NPCommsPassphrase: 511 | psp2NPCommsSig: 512 | psp2ParamSfxPath: 513 | psp2ManualPath: 514 | psp2LiveAreaGatePath: 515 | psp2LiveAreaBackroundPath: 516 | psp2LiveAreaPath: 517 | psp2LiveAreaTrialPath: 518 | psp2PatchChangeInfoPath: 519 | psp2PatchOriginalPackage: 520 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 521 | psp2KeystoneFile: 522 | psp2MemoryExpansionMode: 0 523 | psp2DRMType: 0 524 | psp2StorageType: 0 525 | psp2MediaCapacity: 0 526 | psp2DLCConfigPath: 527 | psp2ThumbnailPath: 528 | psp2BackgroundPath: 529 | psp2SoundPath: 530 | psp2TrophyCommId: 531 | psp2TrophyPackagePath: 532 | psp2PackagedResourcesPath: 533 | psp2SaveDataQuota: 10240 534 | psp2ParentalLevel: 1 535 | psp2ShortTitle: Not Set 536 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 537 | psp2Category: 0 538 | psp2MasterVersion: 01.00 539 | psp2AppVersion: 01.00 540 | psp2TVBootMode: 0 541 | psp2EnterButtonAssignment: 2 542 | psp2TVDisableEmu: 0 543 | psp2AllowTwitterDialog: 1 544 | psp2Upgradable: 0 545 | psp2HealthWarning: 0 546 | psp2UseLibLocation: 0 547 | psp2InfoBarOnStartup: 0 548 | psp2InfoBarColor: 0 549 | psp2ScriptOptimizationLevel: 0 550 | splashScreenBackgroundSourceLandscape: {fileID: 0} 551 | splashScreenBackgroundSourcePortrait: {fileID: 0} 552 | spritePackerPolicy: 553 | webGLMemorySize: 256 554 | webGLExceptionSupport: 1 555 | webGLNameFilesAsHashes: 0 556 | webGLDataCaching: 0 557 | webGLDebugSymbols: 0 558 | webGLEmscriptenArgs: 559 | webGLModulesDirectory: 560 | webGLTemplate: APPLICATION:Default 561 | webGLAnalyzeBuildSize: 0 562 | webGLUseEmbeddedResources: 0 563 | webGLCompressionFormat: 1 564 | webGLLinkerTarget: 0 565 | scriptingDefineSymbols: 566 | 1: UNITY_POST_PROCESSING_STACK_V2 567 | 4: UNITY_POST_PROCESSING_STACK_V2 568 | 7: UNITY_POST_PROCESSING_STACK_V2 569 | 13: UNITY_POST_PROCESSING_STACK_V2 570 | 17: UNITY_POST_PROCESSING_STACK_V2 571 | 18: UNITY_POST_PROCESSING_STACK_V2 572 | 19: UNITY_POST_PROCESSING_STACK_V2 573 | 21: UNITY_POST_PROCESSING_STACK_V2 574 | 23: UNITY_POST_PROCESSING_STACK_V2 575 | 24: UNITY_POST_PROCESSING_STACK_V2 576 | 25: UNITY_POST_PROCESSING_STACK_V2 577 | 26: UNITY_POST_PROCESSING_STACK_V2 578 | 27: UNITY_POST_PROCESSING_STACK_V2 579 | platformArchitecture: {} 580 | scriptingBackend: {} 581 | il2cppCompilerConfiguration: {} 582 | incrementalIl2cppBuild: {} 583 | allowUnsafeCode: 0 584 | additionalIl2CppArgs: 585 | scriptingRuntimeVersion: 0 586 | apiCompatibilityLevelPerPlatform: {} 587 | m_RenderingPath: 1 588 | m_MobileRenderingPath: 1 589 | metroPackageName: Template_3D 590 | metroPackageVersion: 591 | metroCertificatePath: 592 | metroCertificatePassword: 593 | metroCertificateSubject: 594 | metroCertificateIssuer: 595 | metroCertificateNotAfter: 0000000000000000 596 | metroApplicationDescription: Template_3D 597 | wsaImages: {} 598 | metroTileShortName: 599 | metroCommandLineArgsFile: 600 | metroTileShowName: 0 601 | metroMediumTileShowName: 0 602 | metroLargeTileShowName: 0 603 | metroWideTileShowName: 0 604 | metroDefaultTileSize: 1 605 | metroTileForegroundText: 2 606 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 607 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 608 | a: 1} 609 | metroSplashScreenUseBackgroundColor: 0 610 | platformCapabilities: {} 611 | metroFTAName: 612 | metroFTAFileTypes: [] 613 | metroProtocolName: 614 | metroCompilationOverrides: 1 615 | tizenProductDescription: 616 | tizenProductURL: 617 | tizenSigningProfileName: 618 | tizenGPSPermissions: 0 619 | tizenMicrophonePermissions: 0 620 | tizenDeploymentTarget: 621 | tizenDeploymentTargetType: -1 622 | tizenMinOSVersion: 1 623 | n3dsUseExtSaveData: 0 624 | n3dsCompressStaticMem: 1 625 | n3dsExtSaveDataNumber: 0x12345 626 | n3dsStackSize: 131072 627 | n3dsTargetPlatform: 2 628 | n3dsRegion: 7 629 | n3dsMediaSize: 0 630 | n3dsLogoStyle: 3 631 | n3dsTitle: GameName 632 | n3dsProductCode: 633 | n3dsApplicationId: 0xFF3FF 634 | XboxOneProductId: 635 | XboxOneUpdateKey: 636 | XboxOneSandboxId: 637 | XboxOneContentId: 638 | XboxOneTitleId: 639 | XboxOneSCId: 640 | XboxOneGameOsOverridePath: 641 | XboxOnePackagingOverridePath: 642 | XboxOneAppManifestOverridePath: 643 | XboxOnePackageEncryption: 0 644 | XboxOnePackageUpdateGranularity: 2 645 | XboxOneDescription: 646 | XboxOneLanguage: 647 | - enus 648 | XboxOneCapability: [] 649 | XboxOneGameRating: {} 650 | XboxOneIsContentPackage: 0 651 | XboxOneEnableGPUVariability: 0 652 | XboxOneSockets: {} 653 | XboxOneSplashScreen: {fileID: 0} 654 | XboxOneAllowedProductIds: [] 655 | XboxOnePersistentLocalStorageSize: 0 656 | XboxOneXTitleMemory: 8 657 | xboxOneScriptCompiler: 0 658 | vrEditorSettings: 659 | daydream: 660 | daydreamIconForeground: {fileID: 0} 661 | daydreamIconBackground: {fileID: 0} 662 | cloudServicesEnabled: 663 | UNet: 1 664 | facebookSdkVersion: 7.9.4 665 | apiCompatibilityLevel: 2 666 | cloudProjectId: 667 | projectName: Template_3D 668 | organizationId: 669 | cloudEnabled: 0 670 | enableNativePlatformBackendsForNewInputSystem: 0 671 | disableOldInputManagerSupport: 0 672 | --------------------------------------------------------------------------------