├── .gitignore ├── Assets ├── PrimativeCreator.meta ├── PrimativeCreator │ ├── Editor.meta │ ├── Editor │ │ ├── AssetDatabaseUtility.cs │ │ ├── AssetDatabaseUtility.cs.meta │ │ ├── PrimitiveCreator.cs │ │ ├── PrimitiveCreator.cs.meta │ │ ├── PrimitiveCreatorNamePresetWindow.cs │ │ ├── PrimitiveCreatorNamePresetWindow.cs.meta │ │ ├── PrimitiveCreatorPrefKeys.cs │ │ ├── PrimitiveCreatorPrefKeys.cs.meta │ │ ├── PrimitiveCreatorSaveData.cs │ │ ├── PrimitiveCreatorSaveData.cs.meta │ │ ├── PrimitiveCreatorWindow.cs │ │ ├── PrimitiveCreatorWindow.cs.meta │ │ ├── ScriptableObjectUtility.cs │ │ └── ScriptableObjectUtility.cs.meta │ ├── Resources.meta │ └── Resources │ │ ├── Blue.mat │ │ ├── Blue.mat.meta │ │ ├── Green.mat │ │ ├── Green.mat.meta │ │ ├── Red.mat │ │ └── Red.mat.meta ├── Resources.meta └── Resources │ ├── PrimitiveCreatorSaveData.asset │ └── PrimitiveCreatorSaveData.asset.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Autogenerated VS/MD solution and project files 9 | ExportedObj/ 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.svd 20 | 21 | 22 | # Unity3D generated meta files 23 | *.pidb.meta 24 | 25 | # Unity3D Generated File On Crash Reports 26 | sysinfo.txt 27 | 28 | # Builds 29 | *.apk 30 | *.unitypackage 31 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffb8e315990124e8f8bff44db38ac7a1 3 | folderAsset: yes 4 | timeCreated: 1471094611 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a302d11355b4147cdbe0a0da5e714da3 3 | folderAsset: yes 4 | timeCreated: 1471320645 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/AssetDatabaseUtility.cs: -------------------------------------------------------------------------------- 1 | namespace RedBlueGames.ToolsExamples 2 | { 3 | using UnityEditor; 4 | using UnityEngine; 5 | using System.IO; 6 | 7 | /// 8 | /// Utilities for Unity's built in AssetDatabase class 9 | /// 10 | public static class AssetDatabaseUtility 11 | { 12 | public const char UnityDirectorySeparator = '/'; 13 | public const string ResourcesFolderName = "Resources"; 14 | 15 | /// 16 | /// Creates the asset and any directories that are missing along its path. 17 | /// 18 | /// UnityObject to create an asset for. 19 | /// Unity file path (e.g. "Assets/Resources/MyFile.asset". 20 | public static void CreateAssetAndDirectories(UnityEngine.Object unityObject, string unityFilePath) 21 | { 22 | var pathDirectory = Path.GetDirectoryName(unityFilePath) + UnityDirectorySeparator; 23 | AssetDatabaseUtility.CreateDirectoriesInPath(pathDirectory); 24 | 25 | AssetDatabase.CreateAsset(unityObject, unityFilePath); 26 | } 27 | 28 | private static void CreateDirectoriesInPath(string unityDirectoryPath) 29 | { 30 | // Check that last character is a directory separator 31 | if (unityDirectoryPath[unityDirectoryPath.Length - 1] != UnityDirectorySeparator) 32 | { 33 | var warningMessage = string.Format( 34 | "Path supplied to CreateDirectoriesInPath that does not include a DirectorySeparator " + 35 | "as the last character." + 36 | "\nSupplied Path: {0}, Filename: {1}", 37 | unityDirectoryPath); 38 | Debug.LogWarning(warningMessage); 39 | } 40 | 41 | // Warn and strip filenames 42 | var filename = Path.GetFileName(unityDirectoryPath); 43 | if (!string.IsNullOrEmpty(filename)) 44 | { 45 | var warningMessage = string.Format( 46 | "Path supplied to CreateDirectoriesInPath that appears to include a filename. It will be " + 47 | "stripped. A path that ends with a DirectorySeparate should be supplied. " + 48 | "\nSupplied Path: {0}, Filename: {1}", 49 | unityDirectoryPath, 50 | filename); 51 | Debug.LogWarning(warningMessage); 52 | 53 | unityDirectoryPath = unityDirectoryPath.Replace(filename, string.Empty); 54 | } 55 | 56 | var folders = unityDirectoryPath.Split(UnityDirectorySeparator); 57 | 58 | // Error if path does NOT start from Assets 59 | if (folders.Length > 0 && folders[0] != "Assets") 60 | { 61 | var exceptionMessage = "AssetDatabaseUtility CreateDirectoriesInPath expects full Unity path, including 'Assets\\\". " + 62 | "Adding Assets to path."; 63 | throw new UnityException(exceptionMessage); 64 | } 65 | 66 | string pathToFolder = string.Empty; 67 | foreach (var folder in folders) 68 | { 69 | // Don't check for or create empty folders 70 | if (string.IsNullOrEmpty(folder)) 71 | { 72 | continue; 73 | } 74 | 75 | // Create folders that don't exist 76 | pathToFolder = string.Concat(pathToFolder, folder); 77 | if (!UnityEditor.AssetDatabase.IsValidFolder(pathToFolder)) 78 | { 79 | var pathToParent = System.IO.Directory.GetParent(pathToFolder).ToString(); 80 | AssetDatabase.CreateFolder(pathToParent, folder); 81 | AssetDatabase.Refresh(); 82 | } 83 | 84 | pathToFolder = string.Concat(pathToFolder, UnityDirectorySeparator); 85 | } 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/AssetDatabaseUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9011cd088bbf74886a315fcd8b8908af 3 | timeCreated: 1469158918 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreator.cs: -------------------------------------------------------------------------------- 1 | namespace RedBlueGames.ToolsExamples 2 | { 3 | using UnityEditor; 4 | using UnityEngine; 5 | using System.Collections.Generic; 6 | 7 | public class PrimitiveCreator 8 | { 9 | private static readonly Dictionary materialPaths = 10 | new Dictionary() 11 | { 12 | { Config.PrimitiveColor.Red, "Red" }, 13 | { Config.PrimitiveColor.Green, "Green" }, 14 | { Config.PrimitiveColor.Blue, "Blue" } 15 | }; 16 | 17 | public static GameObject CreatePrimitive(Config primitiveConfig) 18 | { 19 | var shape = GameObject.CreatePrimitive(primitiveConfig.PrimitiveType); 20 | shape.transform.localScale = Vector3.one * primitiveConfig.UniformScale; 21 | 22 | // Assign the material for the new object 23 | var materialResourcePath = materialPaths[primitiveConfig.Color]; 24 | var material = (Material)Resources.Load(materialResourcePath); 25 | if (material == null) 26 | { 27 | Debug.LogError("No material resource found at resource path" + 28 | materialResourcePath); 29 | 30 | return null; 31 | } 32 | 33 | shape.GetComponent().material = material; 34 | 35 | return shape; 36 | } 37 | 38 | [System.Serializable] 39 | public class Config 40 | { 41 | public string Name; 42 | public UnityEngine.PrimitiveType PrimitiveType; 43 | public PrimitiveColor Color; 44 | public float UniformScale = 1.0f; 45 | 46 | public enum PrimitiveColor 47 | { 48 | Red, 49 | Blue, 50 | Green 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3327f6a8d989b4119a69a106118f0fc6 3 | timeCreated: 1471094859 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorNamePresetWindow.cs: -------------------------------------------------------------------------------- 1 | namespace RedBlueGames.ToolsExamples 2 | { 3 | using UnityEditor; 4 | using UnityEngine; 5 | using UnityEngine.Events; 6 | using System.Collections; 7 | 8 | public class PrimitiveCreatorNamePresetWindow : EditorWindow 9 | { 10 | public NameSavedEvent NameSaved; 11 | 12 | private bool hasUpdated; 13 | private string text; 14 | private GUIContent textLabel; 15 | 16 | /// 17 | /// Show an instance of PrimativeCreatorNamePresetWindow with the specified title. 18 | /// 19 | /// Window title. 20 | public static PrimitiveCreatorNamePresetWindow Show(string windowTitle) 21 | { 22 | return Show(windowTitle, string.Empty); 23 | } 24 | 25 | /// 26 | /// Show an instance of PrimativeCreatorNamePresetWindow with the specified title and 27 | /// optional default text. 28 | /// 29 | /// Window title. 30 | /// Default text. 31 | public static PrimitiveCreatorNamePresetWindow 32 | Show(string windowTitle, string defaultText) 33 | { 34 | var window = EditorWindow.GetWindow( 35 | true, 36 | windowTitle, 37 | true); 38 | window.text = defaultText; 39 | 40 | return window; 41 | } 42 | 43 | private void OnEnable() 44 | { 45 | this.NameSaved = new NameSavedEvent(); 46 | this.textLabel = new GUIContent("Preset Name"); 47 | 48 | this.hasUpdated = false; 49 | } 50 | 51 | private void OnGUI() 52 | { 53 | var nameFieldName = "NameField"; 54 | GUI.SetNextControlName(nameFieldName); 55 | this.text = EditorGUILayout.TextField(this.textLabel, this.text); 56 | 57 | // Focus the name field on the first update 58 | if (!this.hasUpdated) 59 | { 60 | GUI.FocusControl(nameFieldName); 61 | } 62 | 63 | EditorGUILayout.BeginHorizontal(); 64 | if (GUILayout.Button("Cancel")) 65 | { 66 | this.Close(); 67 | } 68 | if (GUILayout.Button("Save")) 69 | { 70 | this.Close(); 71 | this.NameSaved.Invoke(this.text); 72 | } 73 | EditorGUILayout.EndHorizontal(); 74 | 75 | this.hasUpdated = true; 76 | } 77 | 78 | [System.Serializable] 79 | public class NameSavedEvent : UnityEvent 80 | { 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorNamePresetWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbd01e632dfbf44a68b9ee8f04bf263b 3 | timeCreated: 1471322248 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorPrefKeys.cs: -------------------------------------------------------------------------------- 1 | namespace RedBlueGames.ToolsExamples 2 | { 3 | using UnityEngine; 4 | using UnityEditor; 5 | using System.Collections; 6 | 7 | /// 8 | /// PrimitiveCreatorPrefKeys stores keys in EditorPrefs or PlayerPrefs for PrimitiveCreator 9 | /// values 10 | /// 11 | public static class PrimitiveCreatorPrefKeys 12 | { 13 | private const string PreferencePrefix = "PrimitiveCreator/"; 14 | 15 | public static string PreviousConfigIndex 16 | { 17 | get 18 | { 19 | return string.Concat(PreferencePrefix, ProjectID, "PreviousConfigIndex"); 20 | } 21 | } 22 | 23 | public static string UniformScale 24 | { 25 | get 26 | { 27 | return string.Concat(PreferencePrefix, ProjectID, "UniformScale"); 28 | } 29 | } 30 | 31 | public static string Color 32 | { 33 | get 34 | { 35 | return string.Concat(PreferencePrefix, ProjectID, "Color"); 36 | } 37 | } 38 | 39 | public static string PrimitiveType 40 | { 41 | get 42 | { 43 | return string.Concat(PreferencePrefix, ProjectID, "PrimitiveType"); 44 | } 45 | } 46 | 47 | private static string ProjectID 48 | { 49 | get 50 | { 51 | return string.Concat(PlayerSettings.companyName, ".", PlayerSettings.productName, "/"); 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorPrefKeys.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6b84c4de959d43c89ec0193642b014b 3 | timeCreated: 1471202631 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorSaveData.cs: -------------------------------------------------------------------------------- 1 | namespace RedBlueGames.ToolsExamples 2 | { 3 | using UnityEngine; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | 7 | public class PrimitiveCreatorSaveData : ScriptableObject 8 | { 9 | public List ConfigPresets; 10 | 11 | private void OnEnable() 12 | { 13 | if (this.ConfigPresets == null) 14 | { 15 | this.ConfigPresets = new List(); 16 | } 17 | } 18 | 19 | public bool HasConfigForIndex(int index) 20 | { 21 | if (this.ConfigPresets == null || this.ConfigPresets.Count == 0) 22 | { 23 | return false; 24 | } 25 | 26 | return index >= 0 && index < this.ConfigPresets.Count; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorSaveData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8243ad7f1c30400cb0f140393322337 3 | timeCreated: 1471319087 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorWindow.cs: -------------------------------------------------------------------------------- 1 | namespace RedBlueGames.ToolsExamples 2 | { 3 | using UnityEditor; 4 | using UnityEngine; 5 | using System.Collections; 6 | 7 | public class PrimitiveCreatorWindow : EditorWindow 8 | { 9 | private const string SaveDataPath = "Assets/Resources/PrimitiveCreatorSaveData.asset"; 10 | 11 | private PrimitiveCreatorSaveData saveData; 12 | private PrimitiveCreator.Config currentConfig; 13 | private int selectedConfigPreset; 14 | 15 | private GUIContent[] configPresetsNames; 16 | private GUIContent savedConfigLabel; 17 | 18 | private GUIContent configHeaderLabel; 19 | private GUIContent primitiveTypeLabel; 20 | private GUIContent uniformScaleLabel; 21 | private GUIContent colorLabel; 22 | 23 | private GUIContent saveButtonLabel; 24 | private GUIContent renameButtonLabel; 25 | private GUIContent deleteButtonLabel; 26 | 27 | private GUIContent createPrimitiveButtonLabel; 28 | 29 | [MenuItem("Window/Primitive Creator")] 30 | private static void ShowCubeCreatorWindow() 31 | { 32 | EditorWindow.GetWindow("Primitive Creator"); 33 | } 34 | 35 | private void OnEnable() 36 | { 37 | this.LoadSaveData(); 38 | this.LoadConfigFromPreferences(); 39 | 40 | this.savedConfigLabel = new GUIContent("Selected Preset"); 41 | 42 | this.configHeaderLabel = new GUIContent("Primitive Configuration"); 43 | this.primitiveTypeLabel = new GUIContent("Primitive"); 44 | this.uniformScaleLabel = new GUIContent("Uniform Scale"); 45 | this.colorLabel = new GUIContent("Color"); 46 | 47 | this.saveButtonLabel = new GUIContent("Save"); 48 | this.renameButtonLabel = new GUIContent("Rename"); 49 | this.deleteButtonLabel = new GUIContent("Delete"); 50 | 51 | this.createPrimitiveButtonLabel = new GUIContent("Create Primitive"); 52 | } 53 | 54 | private void OnGUI() 55 | { 56 | this.DrawConfigPresetSelectionGUI(); 57 | 58 | EditorGUILayout.Space(); 59 | 60 | this.DrawConfigGUI(); 61 | 62 | EditorGUILayout.Space(); 63 | 64 | if (GUILayout.Button(this.createPrimitiveButtonLabel)) 65 | { 66 | GameObject shape = PrimitiveCreator.CreatePrimitive(this.currentConfig); 67 | 68 | Selection.activeGameObject = shape; 69 | } 70 | 71 | this.SaveSettings(); 72 | } 73 | 74 | private void DrawConfigPresetSelectionGUI() 75 | { 76 | EditorGUILayout.BeginHorizontal(); 77 | 78 | // Check for changes so that we can load in the new Config as it's selected. 79 | EditorGUI.BeginChangeCheck(); 80 | this.selectedConfigPreset = EditorGUILayout.Popup( 81 | this.savedConfigLabel, 82 | selectedConfigPreset, 83 | this.configPresetsNames); 84 | 85 | if (EditorGUI.EndChangeCheck()) 86 | { 87 | this.LoadConfigPresetByIndex(this.selectedConfigPreset); 88 | } 89 | 90 | var isConfigPresetSelected = this.saveData.HasConfigForIndex(this.selectedConfigPreset); 91 | EditorGUI.BeginDisabledGroup(isConfigPresetSelected); 92 | if (GUILayout.Button(this.saveButtonLabel)) 93 | { 94 | var namePresetWindow = PrimitiveCreatorNamePresetWindow.Show("Name Preset"); 95 | 96 | namePresetWindow.NameSaved.AddListener(SaveSelectedPreset); 97 | } 98 | EditorGUI.EndDisabledGroup(); 99 | 100 | EditorGUI.BeginDisabledGroup(!isConfigPresetSelected); 101 | if (GUILayout.Button(this.renameButtonLabel)) 102 | { 103 | var namePresetWindow = PrimitiveCreatorNamePresetWindow.Show("Rename Preset", 104 | this.currentConfig.Name); 105 | 106 | namePresetWindow.NameSaved.AddListener(RenameSelectedPreset); 107 | } 108 | 109 | if (GUILayout.Button(this.deleteButtonLabel)) 110 | { 111 | this.DeleteSelectedPreset(); 112 | } 113 | 114 | EditorGUI.EndDisabledGroup(); 115 | EditorGUILayout.EndHorizontal(); 116 | } 117 | 118 | private void SaveSelectedPreset(string name) 119 | { 120 | this.currentConfig.Name = name; 121 | this.saveData.ConfigPresets.Add(this.currentConfig); 122 | this.PopulateConfigPresetsDropdown(); 123 | 124 | this.selectedConfigPreset = this.saveData.ConfigPresets.Count - 1; 125 | this.LoadConfigPresetByIndex(this.selectedConfigPreset); 126 | } 127 | 128 | private void RenameSelectedPreset(string name) 129 | { 130 | this.currentConfig.Name = name; 131 | this.PopulateConfigPresetsDropdown(); 132 | } 133 | 134 | private void DeleteSelectedPreset() 135 | { 136 | this.saveData.ConfigPresets.Remove(this.currentConfig); 137 | this.selectedConfigPreset = this.saveData.ConfigPresets.Count; 138 | this.PopulateConfigPresetsDropdown(); 139 | this.LoadConfigPresetByIndex(this.selectedConfigPreset); 140 | } 141 | 142 | private void DrawConfigGUI() 143 | { 144 | EditorGUILayout.LabelField(this.configHeaderLabel, EditorStyles.boldLabel); 145 | this.currentConfig.PrimitiveType = (PrimitiveType)EditorGUILayout.EnumPopup( 146 | this.primitiveTypeLabel, 147 | this.currentConfig.PrimitiveType); 148 | 149 | this.currentConfig.UniformScale = EditorGUILayout.FloatField( 150 | this.uniformScaleLabel, 151 | this.currentConfig.UniformScale); 152 | 153 | this.currentConfig.Color = (PrimitiveCreator.Config.PrimitiveColor) 154 | EditorGUILayout.EnumPopup(this.colorLabel, this.currentConfig.Color); 155 | } 156 | 157 | private void LoadSaveData() 158 | { 159 | // This call runs a lot of code, but the basic gist is it's just loading the 160 | // save data, or creating the file and any directories if it doesn't exist. 161 | this.saveData = 162 | ScriptableObjectUtility.LoadOrCreateSaveData(SaveDataPath); 163 | 164 | this.PopulateConfigPresetsDropdown(); 165 | } 166 | 167 | private void PopulateConfigPresetsDropdown() 168 | { 169 | int numSavedConfigs = this.saveData.ConfigPresets.Count; 170 | this.configPresetsNames = new GUIContent[numSavedConfigs + 1]; 171 | for (int i = 0; i < numSavedConfigs; ++i) 172 | { 173 | this.configPresetsNames[i] = new GUIContent(this.saveData.ConfigPresets[i].Name); 174 | } 175 | 176 | this.configPresetsNames[numSavedConfigs] = new GUIContent("New Preset"); 177 | } 178 | 179 | private void LoadConfigFromPreferences() 180 | { 181 | var lastConfigPresetIndex = EditorPrefs.GetInt(PrimitiveCreatorPrefKeys.PreviousConfigIndex); 182 | this.selectedConfigPreset = lastConfigPresetIndex; 183 | this.LoadConfigPresetByIndex(lastConfigPresetIndex); 184 | } 185 | 186 | private void LoadConfigPresetByIndex(int index) 187 | { 188 | if (this.saveData.HasConfigForIndex(this.selectedConfigPreset)) 189 | { 190 | this.currentConfig = this.saveData.ConfigPresets[this.selectedConfigPreset]; 191 | } 192 | else 193 | { 194 | // When no config data is found, use whatever the user last entered in 195 | this.currentConfig = new PrimitiveCreator.Config(); 196 | 197 | this.currentConfig.PrimitiveType = (PrimitiveType) 198 | EditorPrefs.GetInt(PrimitiveCreatorPrefKeys.Color); 199 | 200 | this.currentConfig.UniformScale = EditorPrefs.GetFloat(PrimitiveCreatorPrefKeys.UniformScale); 201 | 202 | this.currentConfig.Color = (PrimitiveCreator.Config.PrimitiveColor) 203 | EditorPrefs.GetInt(PrimitiveCreatorPrefKeys.PrimitiveType); 204 | } 205 | } 206 | 207 | private void SaveSettings() 208 | { 209 | EditorPrefs.SetInt(PrimitiveCreatorPrefKeys.PreviousConfigIndex, this.selectedConfigPreset); 210 | 211 | // Remember what the user last entered for unsaved presets 212 | if (!this.saveData.HasConfigForIndex(this.selectedConfigPreset)) 213 | { 214 | EditorPrefs.SetInt(PrimitiveCreatorPrefKeys.Color, (int)this.currentConfig.PrimitiveType); 215 | EditorPrefs.SetFloat(PrimitiveCreatorPrefKeys.UniformScale, this.currentConfig.UniformScale); 216 | EditorPrefs.SetInt(PrimitiveCreatorPrefKeys.PrimitiveType, (int)this.currentConfig.Color); 217 | } 218 | } 219 | } 220 | } -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/PrimitiveCreatorWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d4e1fabcfb40491c807bcc3feb5c1cd 3 | timeCreated: 1471201265 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/ScriptableObjectUtility.cs: -------------------------------------------------------------------------------- 1 | namespace RedBlueGames.ToolsExamples 2 | { 3 | using System.Collections; 4 | using System.IO; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | /// 9 | /// Utility functions for ScriptableObjects. 10 | /// 11 | public static class ScriptableObjectUtility 12 | { 13 | /// 14 | /// Loads the save data from a Unity relative path. Returns null if the data doesn't exist. 15 | /// 16 | /// The saved data as a ScriptableObject, or null if not found. 17 | /// Unity path to file (e.g. "Assets/Resources/MyFile.asset") 18 | /// The ScriptableObject type 19 | public static T LoadSaveData(string unityPathToFile) where T : ScriptableObject 20 | { 21 | // Path must contain Resources folder 22 | var resourcesFolder = string.Concat( 23 | AssetDatabaseUtility.UnityDirectorySeparator, 24 | AssetDatabaseUtility.ResourcesFolderName, 25 | AssetDatabaseUtility.UnityDirectorySeparator); 26 | 27 | if (!unityPathToFile.Contains(resourcesFolder)) 28 | { 29 | var exceptionMessage = string.Format( 30 | "Failed to Load ScriptableObject of type, {0}, from path: {1}. " + 31 | "Path must begin with Assets and include a directory within the Resources folder.", 32 | typeof(T).ToString(), 33 | unityPathToFile); 34 | throw new UnityException(exceptionMessage); 35 | } 36 | 37 | // Get Resource relative path - Resource path should only include folders underneath Resources and no file extension 38 | var resourceRelativePath = GetResourceRelativePath(unityPathToFile); 39 | 40 | // Remove file extension 41 | var fileExtension = System.IO.Path.GetExtension(unityPathToFile); 42 | resourceRelativePath = resourceRelativePath.Replace(fileExtension, string.Empty); 43 | 44 | return Resources.Load(resourceRelativePath); 45 | } 46 | 47 | /// 48 | /// Loads the saved data, stored as a ScriptableObject at the specified path. If the file or folders don't exist, 49 | /// it creates them. 50 | /// 51 | /// The saved data as a ScriptableObject. 52 | /// Unity path to file (e.g. "Assets/Resources/MyFile.asset") 53 | /// The ScriptableObject type 54 | public static T LoadOrCreateSaveData(string unityPathToFile) where T : ScriptableObject 55 | { 56 | var loadedSettings = LoadSaveData(unityPathToFile); 57 | if (loadedSettings == null) 58 | { 59 | loadedSettings = ScriptableObject.CreateInstance(); 60 | AssetDatabaseUtility.CreateAssetAndDirectories(loadedSettings, unityPathToFile); 61 | } 62 | 63 | return loadedSettings; 64 | } 65 | 66 | private static string GetResourceRelativePath(string unityPath) 67 | { 68 | var resourcesFolder = AssetDatabaseUtility.ResourcesFolderName + AssetDatabaseUtility.UnityDirectorySeparator; 69 | var pathToResources = unityPath.Substring(0, unityPath.IndexOf(resourcesFolder)); 70 | 71 | // Remove all folders leading up to the Resources folder 72 | pathToResources = unityPath.Replace(pathToResources, string.Empty); 73 | 74 | // Remove the Resources folder 75 | pathToResources = pathToResources.Replace(resourcesFolder, string.Empty); 76 | 77 | return pathToResources; 78 | } 79 | } 80 | } -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Editor/ScriptableObjectUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5bf0ea2b912b41b080813f3672f7d45 3 | timeCreated: 1469158915 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37561fe598437454fba56aa094a48c85 3 | folderAsset: yes 4 | timeCreated: 1471095802 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Resources/Blue.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: Blue 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0, g: 0.17241383, b: 1, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Resources/Blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb136ef12426543a0a80e98985f4216e 3 | timeCreated: 1471095823 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Resources/Green.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: Green 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 0, g: 0.85294116, b: 0.076470576, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Resources/Green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11de90860c51e45bdb3250f0a973ad28 3 | timeCreated: 1471095812 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Resources/Red.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: Red 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: 0.5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: 0.02 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: 0.5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 1, g: 0, b: 0, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/PrimativeCreator/Resources/Red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b91f67928c34491fa3da3f0e572aca5 3 | timeCreated: 1471095808 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cdbd354d53ca4c68a6ddcca5a312368 3 | folderAsset: yes 4 | timeCreated: 1471325219 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/PrimitiveCreatorSaveData.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: a8243ad7f1c30400cb0f140393322337, type: 3} 12 | m_Name: PrimitiveCreatorSaveData 13 | m_EditorClassIdentifier: 14 | ConfigPresets: [] 15 | -------------------------------------------------------------------------------- /Assets/Resources/PrimitiveCreatorSaveData.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd41ef316960841ee8f9647af1d6fe11 3 | timeCreated: 1471325219 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Edward Rowe 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 2 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_SolverIterationCount: 6 13 | m_QueriesHitTriggers: 1 14 | m_EnableAdaptiveForce: 0 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 2 13 | m_SpritePackerPaddingPower: 1 14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 15 | m_ProjectGenerationRootNamespace: 16 | -------------------------------------------------------------------------------- /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: 5 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_LegacyDeferred: 14 | m_Mode: 1 15 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 16 | m_AlwaysIncludedShaders: 17 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 18 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 19 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 20 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 21 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 22 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 23 | m_PreloadedShaders: [] 24 | m_ShaderSettings: 25 | useScreenSpaceShadows: 1 26 | m_BuildTargetShaderSettings: [] 27 | m_LightmapStripping: 0 28 | m_FogStripping: 0 29 | m_LightmapKeepPlain: 1 30 | m_LightmapKeepDirCombined: 1 31 | m_LightmapKeepDirSeparate: 1 32 | m_LightmapKeepDynamicPlain: 1 33 | m_LightmapKeepDynamicDirCombined: 1 34 | m_LightmapKeepDynamicDirSeparate: 1 35 | m_FogKeepLinear: 1 36 | m_FogKeepExp: 1 37 | m_FogKeepExp2: 1 38 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshAreas: 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 2 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_MinPenetrationForPenalty: 0.01 17 | m_BaumgarteScale: 0.2 18 | m_BaumgarteTimeOfImpactScale: 0.75 19 | m_TimeToSleep: 0.5 20 | m_LinearSleepTolerance: 0.01 21 | m_AngularSleepTolerance: 2 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 0 25 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 26 | -------------------------------------------------------------------------------- /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: 8 7 | AndroidProfiler: 0 8 | defaultScreenOrientation: 4 9 | targetDevice: 2 10 | useOnDemandResources: 0 11 | accelerometerFrequency: 60 12 | companyName: RedBlueGames 13 | productName: UnityCustomToolExample 14 | defaultCursor: {fileID: 0} 15 | cursorHotspot: {x: 0, y: 0} 16 | m_ShowUnitySplashScreen: 1 17 | m_VirtualRealitySplashScreen: {fileID: 0} 18 | defaultScreenWidth: 1024 19 | defaultScreenHeight: 768 20 | defaultScreenWidthWeb: 960 21 | defaultScreenHeightWeb: 600 22 | m_RenderingPath: 1 23 | m_MobileRenderingPath: 1 24 | m_ActiveColorSpace: 0 25 | m_MTRendering: 1 26 | m_MobileMTRendering: 0 27 | m_Stereoscopic3D: 0 28 | iosShowActivityIndicatorOnLoading: -1 29 | androidShowActivityIndicatorOnLoading: -1 30 | iosAppInBackgroundBehavior: 0 31 | displayResolutionDialog: 1 32 | iosAllowHTTPDownload: 1 33 | allowedAutorotateToPortrait: 1 34 | allowedAutorotateToPortraitUpsideDown: 1 35 | allowedAutorotateToLandscapeRight: 1 36 | allowedAutorotateToLandscapeLeft: 1 37 | useOSAutorotation: 1 38 | use32BitDisplayBuffer: 1 39 | disableDepthAndStencilBuffers: 0 40 | defaultIsFullScreen: 1 41 | defaultIsNativeResolution: 1 42 | runInBackground: 0 43 | captureSingleScreen: 0 44 | Override IPod Music: 0 45 | Prepare IOS For Recording: 0 46 | submitAnalytics: 1 47 | usePlayerLog: 1 48 | bakeCollisionMeshes: 0 49 | forceSingleInstance: 0 50 | resizableWindow: 0 51 | useMacAppStoreValidation: 0 52 | gpuSkinning: 0 53 | xboxPIXTextureCapture: 0 54 | xboxEnableAvatar: 0 55 | xboxEnableKinect: 0 56 | xboxEnableKinectAutoTracking: 0 57 | xboxEnableFitness: 0 58 | visibleInBackground: 0 59 | allowFullscreenSwitch: 1 60 | macFullscreenMode: 2 61 | d3d9FullscreenMode: 1 62 | d3d11FullscreenMode: 1 63 | xboxSpeechDB: 0 64 | xboxEnableHeadOrientation: 0 65 | xboxEnableGuest: 0 66 | xboxEnablePIXSampling: 0 67 | n3dsDisableStereoscopicView: 0 68 | n3dsEnableSharedListOpt: 1 69 | n3dsEnableVSync: 0 70 | uiUse16BitDepthBuffer: 0 71 | ignoreAlphaClear: 0 72 | xboxOneResolution: 0 73 | ps3SplashScreen: {fileID: 0} 74 | videoMemoryForVertexBuffers: 0 75 | psp2PowerMode: 0 76 | psp2AcquireBGM: 1 77 | wiiUTVResolution: 0 78 | wiiUGamePadMSAA: 1 79 | wiiUSupportsNunchuk: 0 80 | wiiUSupportsClassicController: 0 81 | wiiUSupportsBalanceBoard: 0 82 | wiiUSupportsMotionPlus: 0 83 | wiiUSupportsProController: 0 84 | wiiUAllowScreenCapture: 1 85 | wiiUControllerCount: 0 86 | m_SupportedAspectRatios: 87 | 4:3: 1 88 | 5:4: 1 89 | 16:10: 1 90 | 16:9: 1 91 | Others: 1 92 | bundleIdentifier: com.Company.ProductName 93 | bundleVersion: 1.0 94 | preloadedAssets: [] 95 | metroEnableIndependentInputSource: 0 96 | metroEnableLowLatencyPresentationAPI: 0 97 | xboxOneDisableKinectGpuReservation: 0 98 | virtualRealitySupported: 0 99 | productGUID: f52cd6b84413b4b528b6b9a0148444c3 100 | AndroidBundleVersionCode: 1 101 | AndroidMinSdkVersion: 9 102 | AndroidPreferredInstallLocation: 1 103 | aotOptions: 104 | apiCompatibilityLevel: 2 105 | stripEngineCode: 1 106 | iPhoneStrippingLevel: 0 107 | iPhoneScriptCallOptimization: 0 108 | iPhoneBuildNumber: 0 109 | ForceInternetPermission: 0 110 | ForceSDCardPermission: 0 111 | CreateWallpaper: 0 112 | APKExpansionFiles: 0 113 | preloadShaders: 0 114 | StripUnusedMeshComponents: 0 115 | VertexChannelCompressionMask: 116 | serializedVersion: 2 117 | m_Bits: 238 118 | iPhoneSdkVersion: 988 119 | iPhoneTargetOSVersion: 22 120 | uIPrerenderedIcon: 0 121 | uIRequiresPersistentWiFi: 0 122 | uIRequiresFullScreen: 1 123 | uIStatusBarHidden: 1 124 | uIExitOnSuspend: 0 125 | uIStatusBarStyle: 0 126 | iPhoneSplashScreen: {fileID: 0} 127 | iPhoneHighResSplashScreen: {fileID: 0} 128 | iPhoneTallHighResSplashScreen: {fileID: 0} 129 | iPhone47inSplashScreen: {fileID: 0} 130 | iPhone55inPortraitSplashScreen: {fileID: 0} 131 | iPhone55inLandscapeSplashScreen: {fileID: 0} 132 | iPadPortraitSplashScreen: {fileID: 0} 133 | iPadHighResPortraitSplashScreen: {fileID: 0} 134 | iPadLandscapeSplashScreen: {fileID: 0} 135 | iPadHighResLandscapeSplashScreen: {fileID: 0} 136 | appleTVSplashScreen: {fileID: 0} 137 | tvOSSmallIconLayers: [] 138 | tvOSLargeIconLayers: [] 139 | tvOSTopShelfImageLayers: [] 140 | iOSLaunchScreenType: 0 141 | iOSLaunchScreenPortrait: {fileID: 0} 142 | iOSLaunchScreenLandscape: {fileID: 0} 143 | iOSLaunchScreenBackgroundColor: 144 | serializedVersion: 2 145 | rgba: 0 146 | iOSLaunchScreenFillPct: 100 147 | iOSLaunchScreenSize: 100 148 | iOSLaunchScreenCustomXibPath: 149 | iOSLaunchScreeniPadType: 0 150 | iOSLaunchScreeniPadImage: {fileID: 0} 151 | iOSLaunchScreeniPadBackgroundColor: 152 | serializedVersion: 2 153 | rgba: 0 154 | iOSLaunchScreeniPadFillPct: 100 155 | iOSLaunchScreeniPadSize: 100 156 | iOSLaunchScreeniPadCustomXibPath: 157 | iOSDeviceRequirements: [] 158 | AndroidTargetDevice: 0 159 | AndroidSplashScreenScale: 0 160 | androidSplashScreen: {fileID: 0} 161 | AndroidKeystoreName: 162 | AndroidKeyaliasName: 163 | AndroidTVCompatibility: 1 164 | AndroidIsGame: 1 165 | androidEnableBanner: 1 166 | m_AndroidBanners: 167 | - width: 320 168 | height: 180 169 | banner: {fileID: 0} 170 | androidGamepadSupportLevel: 0 171 | resolutionDialogBanner: {fileID: 0} 172 | m_BuildTargetIcons: 173 | - m_BuildTarget: 174 | m_Icons: 175 | - serializedVersion: 2 176 | m_Icon: {fileID: 0} 177 | m_Width: 128 178 | m_Height: 128 179 | m_BuildTargetBatching: [] 180 | m_BuildTargetGraphicsAPIs: [] 181 | webPlayerTemplate: APPLICATION:Default 182 | m_TemplateCustomTags: {} 183 | wiiUTitleID: 0005000011000000 184 | wiiUGroupID: 00010000 185 | wiiUCommonSaveSize: 4096 186 | wiiUAccountSaveSize: 2048 187 | wiiUOlvAccessKey: 0 188 | wiiUTinCode: 0 189 | wiiUJoinGameId: 0 190 | wiiUJoinGameModeMask: 0000000000000000 191 | wiiUCommonBossSize: 0 192 | wiiUAccountBossSize: 0 193 | wiiUAddOnUniqueIDs: [] 194 | wiiUMainThreadStackSize: 3072 195 | wiiULoaderThreadStackSize: 1024 196 | wiiUSystemHeapSize: 128 197 | wiiUTVStartupScreen: {fileID: 0} 198 | wiiUGamePadStartupScreen: {fileID: 0} 199 | wiiUProfilerLibPath: 200 | actionOnDotNetUnhandledException: 1 201 | enableInternalProfiler: 0 202 | logObjCUncaughtExceptions: 1 203 | enableCrashReportAPI: 0 204 | locationUsageDescription: 205 | XboxTitleId: 206 | XboxImageXexPath: 207 | XboxSpaPath: 208 | XboxGenerateSpa: 0 209 | XboxDeployKinectResources: 0 210 | XboxSplashScreen: {fileID: 0} 211 | xboxEnableSpeech: 0 212 | xboxAdditionalTitleMemorySize: 0 213 | xboxDeployKinectHeadOrientation: 0 214 | xboxDeployKinectHeadPosition: 0 215 | ps3TitleConfigPath: 216 | ps3DLCConfigPath: 217 | ps3ThumbnailPath: 218 | ps3BackgroundPath: 219 | ps3SoundPath: 220 | ps3NPAgeRating: 12 221 | ps3TrophyCommId: 222 | ps3NpCommunicationPassphrase: 223 | ps3TrophyPackagePath: 224 | ps3BootCheckMaxSaveGameSizeKB: 128 225 | ps3TrophyCommSig: 226 | ps3SaveGameSlots: 1 227 | ps3TrialMode: 0 228 | ps3VideoMemoryForAudio: 0 229 | ps3EnableVerboseMemoryStats: 0 230 | ps3UseSPUForUmbra: 0 231 | ps3EnableMoveSupport: 1 232 | ps3DisableDolbyEncoding: 0 233 | ps4NPAgeRating: 12 234 | ps4NPTitleSecret: 235 | ps4NPTrophyPackPath: 236 | ps4ParentalLevel: 1 237 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 238 | ps4Category: 0 239 | ps4MasterVersion: 01.00 240 | ps4AppVersion: 01.00 241 | ps4AppType: 0 242 | ps4ParamSfxPath: 243 | ps4VideoOutPixelFormat: 0 244 | ps4VideoOutResolution: 4 245 | ps4PronunciationXMLPath: 246 | ps4PronunciationSIGPath: 247 | ps4BackgroundImagePath: 248 | ps4StartupImagePath: 249 | ps4SaveDataImagePath: 250 | ps4SdkOverride: 251 | ps4BGMPath: 252 | ps4ShareFilePath: 253 | ps4ShareOverlayImagePath: 254 | ps4PrivacyGuardImagePath: 255 | ps4NPtitleDatPath: 256 | ps4RemotePlayKeyAssignment: -1 257 | ps4RemotePlayKeyMappingDir: 258 | ps4EnterButtonAssignment: 1 259 | ps4ApplicationParam1: 0 260 | ps4ApplicationParam2: 0 261 | ps4ApplicationParam3: 0 262 | ps4ApplicationParam4: 0 263 | ps4DownloadDataSize: 0 264 | ps4GarlicHeapSize: 2048 265 | ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE 266 | ps4pnSessions: 1 267 | ps4pnPresence: 1 268 | ps4pnFriends: 1 269 | ps4pnGameCustomData: 1 270 | playerPrefsSupport: 0 271 | ps4ReprojectionSupport: 0 272 | ps4UseAudio3dBackend: 0 273 | ps4SocialScreenEnabled: 0 274 | ps4Audio3dVirtualSpeakerCount: 14 275 | ps4attribCpuUsage: 0 276 | ps4PatchPkgPath: 277 | ps4PatchLatestPkgPath: 278 | ps4PatchChangeinfoPath: 279 | ps4attribUserManagement: 0 280 | ps4attribMoveSupport: 0 281 | ps4attrib3DSupport: 0 282 | ps4attribShareSupport: 0 283 | ps4IncludedModules: [] 284 | monoEnv: 285 | psp2Splashimage: {fileID: 0} 286 | psp2NPTrophyPackPath: 287 | psp2NPSupportGBMorGJP: 0 288 | psp2NPAgeRating: 12 289 | psp2NPTitleDatPath: 290 | psp2NPCommsID: 291 | psp2NPCommunicationsID: 292 | psp2NPCommsPassphrase: 293 | psp2NPCommsSig: 294 | psp2ParamSfxPath: 295 | psp2ManualPath: 296 | psp2LiveAreaGatePath: 297 | psp2LiveAreaBackroundPath: 298 | psp2LiveAreaPath: 299 | psp2LiveAreaTrialPath: 300 | psp2PatchChangeInfoPath: 301 | psp2PatchOriginalPackage: 302 | psp2PackagePassword: WRK5RhRXdCdG5nG5azdNMK66MuCV6GXi 303 | psp2KeystoneFile: 304 | psp2MemoryExpansionMode: 0 305 | psp2DRMType: 0 306 | psp2StorageType: 0 307 | psp2MediaCapacity: 0 308 | psp2DLCConfigPath: 309 | psp2ThumbnailPath: 310 | psp2BackgroundPath: 311 | psp2SoundPath: 312 | psp2TrophyCommId: 313 | psp2TrophyPackagePath: 314 | psp2PackagedResourcesPath: 315 | psp2SaveDataQuota: 10240 316 | psp2ParentalLevel: 1 317 | psp2ShortTitle: Not Set 318 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 319 | psp2Category: 0 320 | psp2MasterVersion: 01.00 321 | psp2AppVersion: 01.00 322 | psp2TVBootMode: 0 323 | psp2EnterButtonAssignment: 2 324 | psp2TVDisableEmu: 0 325 | psp2AllowTwitterDialog: 1 326 | psp2Upgradable: 0 327 | psp2HealthWarning: 0 328 | psp2UseLibLocation: 0 329 | psp2InfoBarOnStartup: 0 330 | psp2InfoBarColor: 0 331 | psmSplashimage: {fileID: 0} 332 | spritePackerPolicy: 333 | scriptingDefineSymbols: {} 334 | metroPackageName: BlogSharedData 335 | metroPackageVersion: 336 | metroCertificatePath: 337 | metroCertificatePassword: 338 | metroCertificateSubject: 339 | metroCertificateIssuer: 340 | metroCertificateNotAfter: 0000000000000000 341 | metroApplicationDescription: BlogSharedData 342 | wsaImages: {} 343 | metroTileShortName: 344 | metroCommandLineArgsFile: 345 | metroTileShowName: 0 346 | metroMediumTileShowName: 0 347 | metroLargeTileShowName: 0 348 | metroWideTileShowName: 0 349 | metroDefaultTileSize: 1 350 | metroTileForegroundText: 1 351 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 352 | metroSplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, 353 | a: 1} 354 | metroSplashScreenUseBackgroundColor: 1 355 | platformCapabilities: {} 356 | metroFTAName: 357 | metroFTAFileTypes: [] 358 | metroProtocolName: 359 | metroCompilationOverrides: 1 360 | blackberryDeviceAddress: 361 | blackberryDevicePassword: 362 | blackberryTokenPath: 363 | blackberryTokenExires: 364 | blackberryTokenAuthor: 365 | blackberryTokenAuthorId: 366 | blackberryCskPassword: 367 | blackberrySaveLogPath: 368 | blackberrySharedPermissions: 0 369 | blackberryCameraPermissions: 0 370 | blackberryGPSPermissions: 0 371 | blackberryDeviceIDPermissions: 0 372 | blackberryMicrophonePermissions: 0 373 | blackberryGamepadSupport: 0 374 | blackberryBuildId: 0 375 | blackberryLandscapeSplashScreen: {fileID: 0} 376 | blackberryPortraitSplashScreen: {fileID: 0} 377 | blackberrySquareSplashScreen: {fileID: 0} 378 | tizenProductDescription: 379 | tizenProductURL: 380 | tizenSigningProfileName: 381 | tizenGPSPermissions: 0 382 | tizenMicrophonePermissions: 0 383 | n3dsUseExtSaveData: 0 384 | n3dsCompressStaticMem: 1 385 | n3dsExtSaveDataNumber: 0x12345 386 | n3dsStackSize: 131072 387 | n3dsTargetPlatform: 2 388 | n3dsRegion: 7 389 | n3dsMediaSize: 0 390 | n3dsLogoStyle: 3 391 | n3dsTitle: GameName 392 | n3dsProductCode: 393 | n3dsApplicationId: 0xFF3FF 394 | stvDeviceAddress: 395 | stvProductDescription: 396 | stvProductAuthor: 397 | stvProductAuthorEmail: 398 | stvProductLink: 399 | stvProductCategory: 0 400 | XboxOneProductId: 401 | XboxOneUpdateKey: 402 | XboxOneSandboxId: 403 | XboxOneContentId: 404 | XboxOneTitleId: 405 | XboxOneSCId: 406 | XboxOneGameOsOverridePath: 407 | XboxOnePackagingOverridePath: 408 | XboxOneAppManifestOverridePath: 409 | XboxOnePackageEncryption: 0 410 | XboxOnePackageUpdateGranularity: 2 411 | XboxOneDescription: 412 | XboxOneIsContentPackage: 0 413 | XboxOneEnableGPUVariability: 0 414 | XboxOneSockets: {} 415 | XboxOneSplashScreen: {fileID: 0} 416 | XboxOneAllowedProductIds: [] 417 | XboxOnePersistentLocalStorageSize: 0 418 | intPropertyNames: 419 | - Android::ScriptingBackend 420 | - Standalone::ScriptingBackend 421 | - WebPlayer::ScriptingBackend 422 | Android::ScriptingBackend: 0 423 | Standalone::ScriptingBackend: 0 424 | WebPlayer::ScriptingBackend: 0 425 | boolPropertyNames: 426 | - XboxOne::enus 427 | XboxOne::enus: 1 428 | stringPropertyNames: [] 429 | cloudProjectId: 430 | projectName: 431 | organizationId: 432 | cloudEnabled: 0 433 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.3.3f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /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: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 2 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | blendWeights: 1 21 | textureQuality: 1 22 | anisotropicTextures: 0 23 | antiAliasing: 0 24 | softParticles: 0 25 | softVegetation: 0 26 | realtimeReflectionProbes: 0 27 | billboardsFaceCameraPosition: 0 28 | vSyncCount: 0 29 | lodBias: 0.3 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 4 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | - serializedVersion: 2 36 | name: Fast 37 | pixelLightCount: 0 38 | shadows: 0 39 | shadowResolution: 0 40 | shadowProjection: 1 41 | shadowCascades: 1 42 | shadowDistance: 20 43 | shadowNearPlaneOffset: 2 44 | shadowCascade2Split: 0.33333334 45 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 46 | blendWeights: 2 47 | textureQuality: 0 48 | anisotropicTextures: 0 49 | antiAliasing: 0 50 | softParticles: 0 51 | softVegetation: 0 52 | realtimeReflectionProbes: 0 53 | billboardsFaceCameraPosition: 0 54 | vSyncCount: 0 55 | lodBias: 0.4 56 | maximumLODLevel: 0 57 | particleRaycastBudget: 16 58 | asyncUploadTimeSlice: 2 59 | asyncUploadBufferSize: 4 60 | excludedTargetPlatforms: [] 61 | - serializedVersion: 2 62 | name: Simple 63 | pixelLightCount: 1 64 | shadows: 1 65 | shadowResolution: 0 66 | shadowProjection: 1 67 | shadowCascades: 1 68 | shadowDistance: 20 69 | shadowNearPlaneOffset: 2 70 | shadowCascade2Split: 0.33333334 71 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 72 | blendWeights: 2 73 | textureQuality: 0 74 | anisotropicTextures: 1 75 | antiAliasing: 0 76 | softParticles: 0 77 | softVegetation: 0 78 | realtimeReflectionProbes: 0 79 | billboardsFaceCameraPosition: 0 80 | vSyncCount: 0 81 | lodBias: 0.7 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 64 84 | asyncUploadTimeSlice: 2 85 | asyncUploadBufferSize: 4 86 | excludedTargetPlatforms: [] 87 | - serializedVersion: 2 88 | name: Good 89 | pixelLightCount: 2 90 | shadows: 2 91 | shadowResolution: 1 92 | shadowProjection: 1 93 | shadowCascades: 2 94 | shadowDistance: 40 95 | shadowNearPlaneOffset: 2 96 | shadowCascade2Split: 0.33333334 97 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 98 | blendWeights: 2 99 | textureQuality: 0 100 | anisotropicTextures: 1 101 | antiAliasing: 0 102 | softParticles: 0 103 | softVegetation: 1 104 | realtimeReflectionProbes: 1 105 | billboardsFaceCameraPosition: 1 106 | vSyncCount: 1 107 | lodBias: 1 108 | maximumLODLevel: 0 109 | particleRaycastBudget: 256 110 | asyncUploadTimeSlice: 2 111 | asyncUploadBufferSize: 4 112 | excludedTargetPlatforms: [] 113 | - serializedVersion: 2 114 | name: Beautiful 115 | pixelLightCount: 3 116 | shadows: 2 117 | shadowResolution: 2 118 | shadowProjection: 1 119 | shadowCascades: 2 120 | shadowDistance: 70 121 | shadowNearPlaneOffset: 2 122 | shadowCascade2Split: 0.33333334 123 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 124 | blendWeights: 4 125 | textureQuality: 0 126 | anisotropicTextures: 2 127 | antiAliasing: 2 128 | softParticles: 1 129 | softVegetation: 1 130 | realtimeReflectionProbes: 1 131 | billboardsFaceCameraPosition: 1 132 | vSyncCount: 1 133 | lodBias: 1.5 134 | maximumLODLevel: 0 135 | particleRaycastBudget: 1024 136 | asyncUploadTimeSlice: 2 137 | asyncUploadBufferSize: 4 138 | excludedTargetPlatforms: [] 139 | - serializedVersion: 2 140 | name: Fantastic 141 | pixelLightCount: 4 142 | shadows: 2 143 | shadowResolution: 2 144 | shadowProjection: 1 145 | shadowCascades: 4 146 | shadowDistance: 150 147 | shadowNearPlaneOffset: 2 148 | shadowCascade2Split: 0.33333334 149 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 150 | blendWeights: 4 151 | textureQuality: 0 152 | anisotropicTextures: 2 153 | antiAliasing: 2 154 | softParticles: 1 155 | softVegetation: 1 156 | realtimeReflectionProbes: 1 157 | billboardsFaceCameraPosition: 1 158 | vSyncCount: 1 159 | lodBias: 2 160 | maximumLODLevel: 0 161 | particleRaycastBudget: 4096 162 | asyncUploadTimeSlice: 2 163 | asyncUploadBufferSize: 4 164 | excludedTargetPlatforms: [] 165 | m_PerPlatformDefaultQuality: 166 | Android: 2 167 | BlackBerry: 2 168 | GLES Emulation: 5 169 | Nintendo 3DS: 5 170 | PS3: 5 171 | PS4: 5 172 | PSM: 5 173 | PSP2: 2 174 | Samsung TV: 2 175 | Standalone: 5 176 | Tizen: 2 177 | WP8: 5 178 | Web: 5 179 | WebGL: 3 180 | WiiU: 5 181 | Windows Store Apps: 5 182 | XBOX360: 5 183 | XboxOne: 5 184 | iPhone: 2 185 | tvOS: 5 186 | -------------------------------------------------------------------------------- /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 | - 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 | -------------------------------------------------------------------------------- /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.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!292 &1 4 | UnityAdsSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_InitializeOnStartup: 1 8 | m_TestMode: 0 9 | m_EnabledPlatforms: 4294967295 10 | m_IosGameId: 11 | m_AndroidGameId: 12 | -------------------------------------------------------------------------------- /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 | UnityPurchasingSettings: 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | UnityAnalyticsSettings: 10 | m_Enabled: 0 11 | m_InitializeOnStartup: 1 12 | m_TestMode: 0 13 | m_TestEventUrl: 14 | m_TestConfigUrl: 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # unity-custom-tool-example 2 | This is sample code that shows many of the facets of creating custom tools for the Unity Editor. 3 | 4 | The tool allows users to place primitive objects in the scene. Users can configure the object's shape, size, and color. 5 | 6 | It's still a work in progress, but when complete it will provide examples for the following: 7 | 8 | * Saving Persistent Data 9 | * Editor Preferences 10 | * Project Specific Preferences 11 | * Shared Data for teams 12 | * Editor Scripting 13 | * Drawing and handling common GUI elements with GUILayout and EditorGUILayout 14 | * GUILayout groups like Horizontal / Vertical layouts 15 | * Disabled GUI elements 16 | * Creating and managing ScriptableObjects 17 | --------------------------------------------------------------------------------