Reworked logic functions so they find the next block Added scene for testing Added proGrids back Added Editor tool to move main camera to scene view Atl-Shit CJosh_Dev_branch
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: a3814f29f4e89e64f95791dff9bb00ea | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 296bd90e667df1f4697823a0aa45acf0 | |||||
guid: 8d7394d70ec233849a60a26da5f23b75 | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 8936b441d7647f74884c94f97bfb8931 | |||||
guid: b60aeba4397d2c14497efdb96fd3b061 | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -0,0 +1,48 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using UnityEngine; | |||||
using Networking.Server; | |||||
public class GameManager : MonoBehaviour | |||||
{ | |||||
#region Inspector Field | |||||
[Header("References")] | |||||
[SerializeField] | |||||
[Tooltip("Prefab of character for players to play")] | |||||
private Character characterPrefab; | |||||
[SerializeField] | |||||
private ConnectionHandler ClientList; | |||||
#endregion Inspector Field | |||||
#region Private Variables | |||||
private Block[] SpawnBlocks; | |||||
#endregion Private Variables | |||||
public void Start() | |||||
{ | |||||
SpawnBlocks = FindObjectsOfType<Block>().Where(p => p.isSpawnable).ToArray(); | |||||
} | |||||
private void SpawnCharacters() | |||||
{ | |||||
foreach(ClientData client in ClientList) | |||||
{ | |||||
Character newChar = Instantiate(characterPrefab); | |||||
newChar.transform.position = SpawnBlocks[0].VisualPosition; | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: a22c943adbcdf7f4d8c3b5dee307012d | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 2604bcb9f5c8b5a4aa6e3acf7f1d2e16 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,77 @@ | |||||
%YAML 1.1 | |||||
%TAG !u! tag:unity3d.com,2011: | |||||
--- !u!21 &2100000 | |||||
Material: | |||||
serializedVersion: 6 | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInstance: {fileID: 0} | |||||
m_PrefabAsset: {fileID: 0} | |||||
m_Name: Rocks2_D | |||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} | |||||
m_ShaderKeywords: | |||||
m_LightmapFlags: 4 | |||||
m_EnableInstancingVariants: 0 | |||||
m_DoubleSidedGI: 0 | |||||
m_CustomRenderQueue: -1 | |||||
stringTagMap: {} | |||||
disabledShaderPasses: [] | |||||
m_SavedProperties: | |||||
serializedVersion: 3 | |||||
m_TexEnvs: | |||||
- _BumpMap: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _DetailAlbedoMap: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _DetailMask: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _DetailNormalMap: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _EmissionMap: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _MainTex: | |||||
m_Texture: {fileID: 2800000, guid: abbd2c18e728a534c80e1824d3d8fc46, type: 3} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _MetallicGlossMap: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _OcclusionMap: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
- _ParallaxMap: | |||||
m_Texture: {fileID: 0} | |||||
m_Scale: {x: 1, y: 1} | |||||
m_Offset: {x: 0, y: 0} | |||||
m_Floats: | |||||
- _BumpScale: 1 | |||||
- _Cutoff: 0.5 | |||||
- _DetailNormalMapScale: 1 | |||||
- _DstBlend: 0 | |||||
- _GlossMapScale: 1 | |||||
- _Glossiness: 0.5 | |||||
- _GlossyReflections: 1 | |||||
- _Metallic: 0 | |||||
- _Mode: 0 | |||||
- _OcclusionStrength: 1 | |||||
- _Parallax: 0.02 | |||||
- _SmoothnessTextureChannel: 0 | |||||
- _SpecularHighlights: 1 | |||||
- _SrcBlend: 1 | |||||
- _UVSec: 0 | |||||
- _ZWrite: 1 | |||||
m_Colors: | |||||
- _Color: {r: 1, g: 1, b: 1, a: 1} | |||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: d34c8522d0974694a894640c21fbbfa8 | |||||
NativeFormatImporter: | |||||
externalObjects: {} | |||||
mainObjectFileID: 2100000 | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b81f39d0267c4f24e9ade35cf595fee0 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 4dc87456bb4f38347b74a915da8aaa4a | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,10 @@ | |||||
fileFormatVersion: 2 | |||||
guid: e5d530989e5bce94ab5f5291d659f672 | |||||
folderAsset: yes | |||||
timeCreated: 1518451281 | |||||
licenseType: Store | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,10 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 48c14226ec988e64dadd74e4676636cd | |||||
folderAsset: yes | |||||
timeCreated: 1518451281 | |||||
licenseType: Store | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,414 @@ | |||||
using UnityEngine; | |||||
using UnityEditor; | |||||
using System.Collections; | |||||
using System.Text; | |||||
using System.Text.RegularExpressions; | |||||
/** | |||||
* INSTRUCTIONS | |||||
* | |||||
* - Only modify properties in the USER SETTINGS region. | |||||
* - All content is loaded from external files (pc_AboutEntry_YourProduct. Use the templates! | |||||
*/ | |||||
/** | |||||
* Used to pop up the window on import. | |||||
*/ | |||||
public class pg_AboutWindowSetup : AssetPostprocessor | |||||
{ | |||||
#region Initialization | |||||
static void OnPostprocessAllAssets ( | |||||
string[] importedAssets, | |||||
string[] deletedAssets, | |||||
string[] movedAssets, | |||||
string[] movedFromAssetPaths) | |||||
{ | |||||
string[] entries = System.Array.FindAll(importedAssets, name => name.Contains("pc_AboutEntry") && !name.EndsWith(".meta")); | |||||
foreach(string str in entries) | |||||
if( pg_AboutWindow.Init(str, false) ) | |||||
break; | |||||
} | |||||
// [MenuItem("Edit/Preferences/Clear About Version: " + AboutWindow.PRODUCT_IDENTIFIER)] | |||||
// public static void MenuClearVersionPref() | |||||
// { | |||||
// EditorPrefs.DeleteKey(AboutWindow.PRODUCT_IDENTIFIER); | |||||
// } | |||||
#endregion | |||||
} | |||||
public class pg_AboutWindow : EditorWindow | |||||
{ | |||||
/** | |||||
* Modify these constants to customize about screen. | |||||
*/ | |||||
#region User Settings | |||||
/* Path to the root folder */ | |||||
const string ABOUT_ROOT = "Assets/ProCore/ProGrids/About"; | |||||
/** | |||||
* Changelog.txt file should follow this format: | |||||
* | |||||
* | -- Product Name 2.1.0 - | |||||
* | | |||||
* | # Features | |||||
* | - All kinds of awesome stuff | |||||
* | - New flux capacitor design achieves time travel at lower velocities. | |||||
* | - Dark matter reactor recalibrated. | |||||
* | | |||||
* | # Bug Fixes | |||||
* | - No longer explodes when spacebar is pressed. | |||||
* | - Fix rolling issue in Rickmeter. | |||||
* | | |||||
* | # Changes | |||||
* | - Changed Blue to Red. | |||||
* | - Enter key now causes explosions. | |||||
* | |||||
* This path is relative to the PRODUCT_ROOT path. | |||||
* | |||||
* Note that your changelog may contain multiple entries. Only the top-most | |||||
* entry will be displayed. | |||||
*/ | |||||
/** | |||||
* Advertisement thumb constructor is: | |||||
* new AdvertisementThumb( PathToAdImage : string, URLToPurchase : string, ProductDescription : string ) | |||||
* Provide as many or few (or none) as desired. | |||||
* | |||||
* Notes - The http:// part is required. Partial URLs do not work on Mac. | |||||
*/ | |||||
[SerializeField] | |||||
public static AdvertisementThumb[] advertisements = new AdvertisementThumb[] { | |||||
new AdvertisementThumb( ABOUT_ROOT + "/Images/ProBuilder_AssetStore_Icon_96px.png", "http://www.protoolsforunity3d.com/probuilder/", "Build and Texture Geometry In-Editor"), | |||||
new AdvertisementThumb( ABOUT_ROOT + "/Images/ProGrids_AssetStore_Icon_96px.png", "http://www.protoolsforunity3d.com/progrids/", "True Grids and Grid-Snapping"), | |||||
new AdvertisementThumb( ABOUT_ROOT + "/Images/ProGroups_AssetStore_Icon_96px.png", "http://www.protoolsforunity3d.com/progroups/", "Hide, Freeze, Group, & Organize"), | |||||
new AdvertisementThumb( ABOUT_ROOT + "/Images/Prototype_AssetStore_Icon_96px.png", "http://www.protoolsforunity3d.com/prototype/", "Design and Build With Zero Lag"), | |||||
new AdvertisementThumb( ABOUT_ROOT + "/Images/QuickBrush_AssetStore_Icon_96px.png", "http://www.protoolsforunity3d.com/quickbrush/", "Quickly Add Detail Geometry"), | |||||
new AdvertisementThumb( ABOUT_ROOT + "/Images/QuickDecals_AssetStore_Icon_96px.png", "http://www.protoolsforunity3d.com/quickdecals/", "Add Dirt, Splatters, Posters, etc"), | |||||
new AdvertisementThumb( ABOUT_ROOT + "/Images/QuickEdit_AssetStore_Icon_96px.png", "http://www.protoolsforunity3d.com/quickedit/", "Edit Imported Meshes!"), | |||||
}; | |||||
#endregion | |||||
/* Recommend you do not modify these. */ | |||||
#region Private Fields (automatically populated) | |||||
private string AboutEntryPath = ""; | |||||
private string ProductName = ""; | |||||
// private string ProductIdentifer = ""; | |||||
private string ProductVersion = ""; | |||||
private string ChangelogPath = ""; | |||||
private string BannerPath = ABOUT_ROOT + "/Images/Banner.png"; | |||||
const int AD_HEIGHT = 96; | |||||
/** | |||||
* Struct containing data for use in Advertisement shelf. | |||||
*/ | |||||
[System.Serializable] | |||||
public struct AdvertisementThumb | |||||
{ | |||||
public Texture2D image; | |||||
public string url; | |||||
public string about; | |||||
public GUIContent guiContent; | |||||
public AdvertisementThumb(string imagePath, string url, string about) | |||||
{ | |||||
guiContent = new GUIContent("", about); | |||||
this.image = (Texture2D) AssetDatabase.LoadAssetAtPath(imagePath, typeof(Texture2D)); | |||||
guiContent.image = this.image; | |||||
this.url = url; | |||||
this.about = about; | |||||
} | |||||
} | |||||
Texture2D banner; | |||||
// populated by first entry in changelog | |||||
string changelog = ""; | |||||
#endregion | |||||
#region Init | |||||
// [MenuItem("Tools/Test Search About Window", false, 0)] | |||||
// public static void MenuInit() | |||||
// { | |||||
// // this could be slow in large projects? | |||||
// string[] allFiles = System.IO.Directory.GetFiles("Assets/", "*.*", System.IO.SearchOption.AllDirectories); | |||||
// string[] entries = System.Array.FindAll(allFiles, name => name.Contains("pc_AboutEntry")); | |||||
// if(entries.Length > 0) | |||||
// AboutWindow.Init(entries[0], true); | |||||
// } | |||||
/** | |||||
* Return true if Init took place, false if not. | |||||
*/ | |||||
public static bool Init (string aboutEntryPath, bool fromMenu) | |||||
{ | |||||
string identifier, version; | |||||
if( !GetField(aboutEntryPath, "version: ", out version) || !GetField(aboutEntryPath, "identifier: ", out identifier)) | |||||
return false; | |||||
if(fromMenu || EditorPrefs.GetString(identifier) != version) | |||||
{ | |||||
string tname; | |||||
pg_AboutWindow win; | |||||
if(!GetField(aboutEntryPath, "name: ", out tname) || !tname.Contains("ProGrids")) | |||||
return false; | |||||
win = (pg_AboutWindow)EditorWindow.GetWindow(typeof(pg_AboutWindow), true, tname, true); | |||||
win.SetAboutEntryPath(aboutEntryPath); | |||||
win.ShowUtility(); | |||||
EditorPrefs.SetString(identifier, version); | |||||
return true; | |||||
} | |||||
else | |||||
{ | |||||
return false; | |||||
} | |||||
} | |||||
public void OnEnable() | |||||
{ | |||||
banner = (Texture2D)AssetDatabase.LoadAssetAtPath(BannerPath, typeof(Texture2D)); | |||||
// With Unity 4 (on PC) if you have different values for minSize and maxSize, | |||||
// they do not apply restrictions to window size. | |||||
this.minSize = new Vector2(banner.width + 12, banner.height * 7); | |||||
this.maxSize = new Vector2(banner.width + 12, banner.height * 7); | |||||
} | |||||
public void SetAboutEntryPath(string path) | |||||
{ | |||||
AboutEntryPath = path; | |||||
PopulateDataFields(AboutEntryPath); | |||||
} | |||||
#endregion | |||||
#region GUI | |||||
Color LinkColor = new Color(0f, .682f, .937f, 1f); | |||||
GUIStyle boldTextStyle, | |||||
headerTextStyle, | |||||
linkTextStyle; | |||||
GUIStyle advertisementStyle; | |||||
Vector2 scroll = Vector2.zero, adScroll = Vector2.zero; | |||||
// int mm = 32; | |||||
void OnGUI() | |||||
{ | |||||
headerTextStyle = headerTextStyle ?? new GUIStyle( EditorStyles.boldLabel );//GUI.skin.label); | |||||
headerTextStyle.fontSize = 16; | |||||
linkTextStyle = linkTextStyle ?? new GUIStyle( GUI.skin.label );//GUI.skin.label); | |||||
linkTextStyle.normal.textColor = LinkColor; | |||||
linkTextStyle.alignment = TextAnchor.MiddleLeft; | |||||
boldTextStyle = boldTextStyle ?? new GUIStyle( GUI.skin.label );//GUI.skin.label); | |||||
boldTextStyle.fontStyle = FontStyle.Bold; | |||||
boldTextStyle.alignment = TextAnchor.MiddleLeft; | |||||
// #if UNITY_4 | |||||
// richTextLabel.richText = true; | |||||
// #endif | |||||
advertisementStyle = advertisementStyle ?? new GUIStyle(GUI.skin.button); | |||||
advertisementStyle.normal.background = null; | |||||
if(banner != null) | |||||
GUILayout.Label(banner); | |||||
// mm = EditorGUI.IntField(new Rect(Screen.width - 200, 100, 200, 18), "W: ", mm); | |||||
{ | |||||
GUILayout.Label("Thank you for purchasing " + ProductName + ". Your support allows us to keep developing this and future tools for everyone.", EditorStyles.wordWrappedLabel); | |||||
GUILayout.Space(2); | |||||
GUILayout.Label("Read these quick \"ProTips\" before starting:", headerTextStyle); | |||||
GUILayout.BeginHorizontal(); | |||||
GUILayout.Label("1) ", GUILayout.MinWidth(16), GUILayout.MaxWidth(16)); | |||||
GUILayout.Label("Register", boldTextStyle, GUILayout.MinWidth(58), GUILayout.MaxWidth(58)); | |||||
GUILayout.Label("for instant email updates, send your invoice # to", GUILayout.MinWidth(284), GUILayout.MaxWidth(284)); | |||||
if( GUILayout.Button("contact@procore3d.com", linkTextStyle, GUILayout.MinWidth(142), GUILayout.MaxWidth(142)) ) | |||||
Application.OpenURL("mailto:contact@procore3d.com?subject=Sign me up for the Beta!"); | |||||
GUILayout.EndHorizontal(); | |||||
GUILayout.BeginHorizontal(); | |||||
GUILayout.Label("2) ", GUILayout.MinWidth(16), GUILayout.MaxWidth(16)); | |||||
GUILayout.Label("Report bugs", boldTextStyle, GUILayout.MinWidth(82), GUILayout.MaxWidth(82)); | |||||
GUILayout.Label("to the ProCore Forum at", GUILayout.MinWidth(144), GUILayout.MaxWidth(144)); | |||||
if( GUILayout.Button("www.procore3d.com/forum", linkTextStyle, GUILayout.MinWidth(162), GUILayout.MaxWidth(162)) ) | |||||
Application.OpenURL("http://www.procore3d.com/forum"); | |||||
GUILayout.EndHorizontal(); | |||||
GUILayout.BeginHorizontal(); | |||||
GUILayout.Label("3) ", GUILayout.MinWidth(16), GUILayout.MaxWidth(16)); | |||||
GUILayout.Label("Customize!", boldTextStyle, GUILayout.MinWidth(74), GUILayout.MaxWidth(74)); | |||||
GUILayout.Label("Click on \"Edit > Preferences\" then \"" + ProductName + "\"", GUILayout.MinWidth(276), GUILayout.MaxWidth(276)); | |||||
GUILayout.EndHorizontal(); | |||||
GUILayout.BeginHorizontal(); | |||||
GUILayout.Label("4) ", GUILayout.MinWidth(16), GUILayout.MaxWidth(16)); | |||||
GUILayout.Label("Documentation", boldTextStyle, GUILayout.MinWidth(102), GUILayout.MaxWidth(102)); | |||||
GUILayout.Label("Tutorials, & more info:", GUILayout.MinWidth(132), GUILayout.MaxWidth(132)); | |||||
if( GUILayout.Button("www.procore3d.com/" + ProductName.ToLower(), linkTextStyle, GUILayout.MinWidth(190), GUILayout.MaxWidth(190)) ) | |||||
Application.OpenURL("http://www.procore3d.com/" + ProductName.ToLower()); | |||||
GUILayout.EndHorizontal(); | |||||
GUILayout.Space(4); | |||||
GUILayout.BeginHorizontal(GUILayout.MaxWidth(50)); | |||||
GUILayout.Label("Links:", boldTextStyle); | |||||
linkTextStyle.fontStyle = FontStyle.Italic; | |||||
linkTextStyle.alignment = TextAnchor.MiddleCenter; | |||||
if( GUILayout.Button("procore3d.com", linkTextStyle)) | |||||
Application.OpenURL("http://www.procore3d.com"); | |||||
if( GUILayout.Button("facebook", linkTextStyle)) | |||||
Application.OpenURL("http://www.facebook.com/probuilder3d"); | |||||
if( GUILayout.Button("twitter", linkTextStyle)) | |||||
Application.OpenURL("http://www.twitter.com/probuilder3d"); | |||||
linkTextStyle.fontStyle = FontStyle.Normal; | |||||
GUILayout.EndHorizontal(); | |||||
GUILayout.Space(4); | |||||
} | |||||
HorizontalLine(); | |||||
// always bold the first line (cause it's the version info stuff) | |||||
scroll = EditorGUILayout.BeginScrollView(scroll); | |||||
GUILayout.Label(ProductName + " | version: " + ProductVersion, EditorStyles.boldLabel); | |||||
GUILayout.Label("\n" + changelog); | |||||
EditorGUILayout.EndScrollView(); | |||||
HorizontalLine(); | |||||
GUILayout.Label("More ProCore Products", EditorStyles.boldLabel); | |||||
int pad = advertisements.Length * AD_HEIGHT > Screen.width ? 22 : 6; | |||||
adScroll = EditorGUILayout.BeginScrollView(adScroll, false, false, GUILayout.MinHeight(AD_HEIGHT + pad), GUILayout.MaxHeight(AD_HEIGHT + pad)); | |||||
GUILayout.BeginHorizontal(); | |||||
foreach(AdvertisementThumb ad in advertisements) | |||||
{ | |||||
if(ad.url.ToLower().Contains(ProductName.ToLower())) | |||||
continue; | |||||
if(GUILayout.Button(ad.guiContent, advertisementStyle, | |||||
GUILayout.MinWidth(AD_HEIGHT), GUILayout.MaxWidth(AD_HEIGHT), | |||||
GUILayout.MinHeight(AD_HEIGHT), GUILayout.MaxHeight(AD_HEIGHT))) | |||||
{ | |||||
Application.OpenURL(ad.url); | |||||
} | |||||
} | |||||
GUILayout.EndHorizontal(); | |||||
EditorGUILayout.EndScrollView(); | |||||
/* shill other products */ | |||||
} | |||||
/** | |||||
* Draw a horizontal line across the screen and update the guilayout. | |||||
*/ | |||||
void HorizontalLine() | |||||
{ | |||||
Rect r = GUILayoutUtility.GetLastRect(); | |||||
Color og = GUI.backgroundColor; | |||||
GUI.backgroundColor = Color.black; | |||||
GUI.Box(new Rect(0f, r.y + r.height + 2, Screen.width, 2f), ""); | |||||
GUI.backgroundColor = og; | |||||
GUILayout.Space(6); | |||||
} | |||||
#endregion | |||||
#region Data Parsing | |||||
/* rich text ain't wuurkin' in unity 3.5 */ | |||||
const string RemoveBraketsRegex = "(\\<.*?\\>)"; | |||||
/** | |||||
* Open VersionInfo and Changelog and pull out text to populate vars for OnGUI to display. | |||||
*/ | |||||
void PopulateDataFields(string entryPath) | |||||
{ | |||||
/* Get data from VersionInfo.txt */ | |||||
TextAsset versionInfo = (TextAsset)AssetDatabase.LoadAssetAtPath( entryPath, typeof(TextAsset)); | |||||
ProductName = ""; | |||||
// ProductIdentifer = ""; | |||||
ProductVersion = ""; | |||||
ChangelogPath = ""; | |||||
if(versionInfo != null) | |||||
{ | |||||
string[] txt = versionInfo.text.Split('\n'); | |||||
foreach(string cheese in txt) | |||||
{ | |||||
if(cheese.StartsWith("name:")) | |||||
ProductName = cheese.Replace("name: ", "").Trim(); | |||||
else | |||||
if(cheese.StartsWith("version:")) | |||||
ProductVersion = cheese.Replace("version: ", "").Trim(); | |||||
else | |||||
if(cheese.StartsWith("changelog:")) | |||||
ChangelogPath = cheese.Replace("changelog: ", "").Trim(); | |||||
} | |||||
} | |||||
// notes = notes.Trim(); | |||||
/* Get first entry in changelog.txt */ | |||||
TextAsset changelogText = (TextAsset)AssetDatabase.LoadAssetAtPath( ChangelogPath, typeof(TextAsset)); | |||||
if(changelogText) | |||||
{ | |||||
string[] split = changelogText.text.Split( new string[] {"--"}, System.StringSplitOptions.RemoveEmptyEntries ); | |||||
StringBuilder sb = new StringBuilder(); | |||||
string[] newLineSplit = split[0].Trim().Split('\n'); | |||||
for(int i = 2; i < newLineSplit.Length; i++) | |||||
sb.AppendLine(newLineSplit[i]); | |||||
changelog = sb.ToString(); | |||||
} | |||||
} | |||||
private static bool GetField(string path, string field, out string value) | |||||
{ | |||||
TextAsset entry = (TextAsset)AssetDatabase.LoadAssetAtPath(path, typeof(TextAsset)); | |||||
value = ""; | |||||
if(!entry) return false; | |||||
foreach(string str in entry.text.Split('\n')) | |||||
{ | |||||
if(str.Contains(field)) | |||||
{ | |||||
value = str.Replace(field, "").Trim(); | |||||
return true; | |||||
} | |||||
} | |||||
return false; | |||||
} | |||||
#endregion | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 397122f2e7afcb643bc5232d77a09e1c | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,10 @@ | |||||
fileFormatVersion: 2 | |||||
guid: a05c2964f6d8b63468de25353d1cc206 | |||||
folderAsset: yes | |||||
timeCreated: 1518451281 | |||||
licenseType: Store | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:6817b80c1145edb46513196309522893aa5f2aa98efb5f7121d61fa78f99a4e4 | |||||
size 42005 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: ceb16aa47d35e7d429e76f5962a66b48 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:f4bee04ce09cc08be6521c45cda7ed8758cf1c18b7b581a831b9df511ea18a7b | |||||
size 23746 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: abd41419a644ca64e9f2c0342c808cbb | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:420b92dda30b3d23946c0d9dab6ad654ca8b1149d33eac4cc7bc84075e7d7dc0 | |||||
size 22290 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 6b05b1effd90efd488ffb0f5aa8c78e1 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:70531264c5c0564abcc6578d1086790aad5f74154b67952eed555929f67dec2e | |||||
size 18643 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 16e30887c69dad541aee23ecc68a4ccb | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:99530ae3324d8f5d001b83a68b58e489f8707c4638eb50a502dd8d35de83d5ce | |||||
size 21884 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: e935b69bdc65eff47be27ce3af1bffa3 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:d166b4b539a23b7fbc2b04f984b6d25d0de8a1da73c6991c527693d75ba213aa | |||||
size 19700 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 6da2ca1eb48c9e445bef0c33ec1cb791 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:cab3759e048ccc1fd099a120f7e124bb4901f0255ca186ab703b431047be82ff | |||||
size 22370 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 5703a8cad7300b14f8185c946e3831df | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:6f3be2b933b716c49a3a5452a8cfdf42401f95339d32059700500822c30c6c3b | |||||
size 21433 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 1dd6a7e769dca5a4a908f2a4abdadc68 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 1 | |||||
linearTexture: 0 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: 5 | |||||
maxTextureSize: 512 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: -1 | |||||
aniso: -1 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 512 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,156 @@ | |||||
-- ProGrids 2.5.0f0 - | |||||
# Features | |||||
- Single key shortcuts now configurable via preferences. | |||||
# Bug Fixes | |||||
- Don't prevent compiling to Windows Store target. | |||||
- Single key shortcuts no long beep on Mac. | |||||
- Fix null reference error if GameObject has a null component. | |||||
-- ProGrids 2.4.1f0 - | |||||
# Bug Fixes | |||||
- Prevent About Window from opening other tool changelogs. | |||||
-- ProGrids 2.4.0f0 - | |||||
# Features | |||||
- Add `pg_IgnoreSnapAttribute` and `ProGridsConditionalSnapAttribute` to disable or conditionally disable snapping on objects. | |||||
- Increase accessible grid multiplier range. | |||||
# Bug Fixes | |||||
- Fix sRGB import settings on icons. | |||||
- Prevert overflow when increasing grid multiplier. | |||||
-- ProGrids 2.3.0f0 - | |||||
# Features | |||||
- Add option to set major line increment. | |||||
- Automatically hide and show the Unity grid when opening / closing ProGrids. | |||||
# Bug Fixes | |||||
- Fix bug where ProGrids could fail to find icons when root folder is moved. | |||||
- Fix bug where ProGrids would not remember it's state between Unity sessions. | |||||
# Changes | |||||
- Slightly increase opacity of default grid colors. | |||||
-- ProGrids 2.2.7f0 - | |||||
# Bug Fixes | |||||
- Fix cases where `Snap on Selected Axes` would sometimes be unset. | |||||
-- ProGrids 2.2.6f0 - | |||||
# Bug Fixes | |||||
- Fix warnings in Unity 5.4 regarding API use during serialization. | |||||
-- ProGrids 2.2.5f0 - | |||||
# Bug Fixes | |||||
- Fix an issue where ProGrids would not stay open across Unity restarts. | |||||
-- ProGrids 2.2.4f0 - | |||||
# Bug Fixes | |||||
- Fix issue where adjusting grid offset would not repaint grid. | |||||
- Attempt to load GUI resources on deserialization, possibly addressing issues with menu icons not loading. | |||||
-- ProGrids 2.2.3f0 - | |||||
# Bug Fixes | |||||
- If icons aren't found, search the project for matching images (allows user to rename or move ProGrids folder). | |||||
- Make menu usable even if icons aren't found in project. | |||||
- Fix bug where grid would fail to render on Mac. | |||||
- Improve performance of grid rendering and increase draw distance. | |||||
-- ProGrids 2.2.2f0 - | |||||
# Bug Fixes | |||||
- Fix possible leak in pg_GridRenderer. | |||||
- Fix 10th line highlight being lost on script reload. | |||||
- Remember open/closed state between Unity loads. | |||||
- Fix bug where multiple ProGrids instances could potentially be instantiated. | |||||
-- ProGrids 2.2.1f0 - | |||||
# Features | |||||
- New interface jettisons bulky Editor Window in favor of a minimal dropdown in the active sceneview. | |||||
- New "Predictive Grid" option will automatically change the grid plane to best match the current movement. | |||||
- Add option to snap all selected objects independently of on another (toggle off "Snap as Group"). | |||||
# Bug Fixes | |||||
- Improve support for multiple open scene view windows. | |||||
- Respect local rotation when calculating snap value. | |||||
-- ProGrids 2.1.7f0 - | |||||
# Features | |||||
- Add preference to enabled snapping scale values. | |||||
-- ProGrids 2.1.6p2 - | |||||
# Features | |||||
- Unity 5 compatibility. | |||||
# Patch 1 | |||||
- Add documentation PDF. | |||||
# Patch 2 | |||||
- Fix Upgradable API warning. | |||||
- Fix version marking in About. | |||||
-- ProGrids 2.1.5 - | |||||
# Bug Fixes | |||||
- Fix crash on OSX in Unity 5. | |||||
- Remember grid position when closing and re-opening ProGrids. | |||||
- Grid lines no longer render on top of geometry in Deferred Rendering. | |||||
- Improve performance of Editor when rendering perspective grids. | |||||
-- ProGrids 2.1.4 - | |||||
# Bug Fixes | |||||
- Remember On/Off state when closing window. | |||||
- ProBuilder now respects temporary snapping disable toggle. | |||||
- ProBuilder now respects temporary axis constraint toggles. | |||||
- Snap value resolution now retained when using -/+ keys to increase or decrease size. | |||||
# Changes | |||||
- Remove deprecated SixBySeven.dll. | |||||
- Remove unused font from Resources folder. | |||||
-- ProGrids 2.1.3 - | |||||
# Bug Fixes | |||||
- Catch instance where GridRenderer would not detect Deferred Rendering path, causing grid to appear black and spotty. | |||||
- Remember grid show/hide preferences across Unity launches. | |||||
-- ProGrids 2.1.2 - | |||||
# Bug Fixes | |||||
- Fix missing grid when using Deferred Rendering path. | |||||
- Fix conflicting shortcut for toggle axis constraints. | |||||
-- ProGrids 2.1.1 - | |||||
# Features | |||||
- New perspective plane grids. | |||||
- New perspective 3d grid. | |||||
- Redesigned interface | |||||
- New `[` and `]` shortcuts decrease and increase grid resolution. | |||||
- New `-` and `+` shortcuts move 3d plane grid forwards and backwards along axis. | |||||
- New `\` shortcut key to toggle between orthographic axis and perspective modes. | |||||
- Improve orthographic grid rendering performance. | |||||
- Highlight every 10th line. | |||||
- New preference toggles use of Axis Constraints while dragging objects (use 'C' key to invert preference on the fly). | |||||
- Shiny new About window. | |||||
# Bug Fixes | |||||
- Update grid in real time while modifying preferences. | |||||
- Catch a rare divide by zero exception on Unity 3. | |||||
# Changes | |||||
- Move ProGrids from 6by7 folder to ProCore. | |||||
- Use new `ProCore.dll` library instead of `SixBySeven.dll`. |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 0ed9527ca682a804198b6fc47623896c | |||||
timeCreated: 18446744011573954816 | |||||
TextScriptImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,5 @@ | |||||
name: ProGrids | |||||
identifier: ProGrids2_AboutWindowIdentifier | |||||
version: 2.5.0f0 | |||||
date: 8-3-2017 | |||||
changelog: Assets/ProCore/ProGrids/About/changelog.txt |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 6a245335660a4654f8bee9ca0cbf5f36 | |||||
timeCreated: 18446744011573954816 | |||||
TextScriptImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,10 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 2102937ec2f1e75418236fac598f9798 | |||||
folderAsset: yes | |||||
timeCreated: 1518451281 | |||||
licenseType: Store | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,41 @@ | |||||
#define PRO | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
namespace ProGrids | |||||
{ | |||||
public static class pg_Constant | |||||
{ | |||||
public const string ProGridsIsEnabled = "pgProGridsIsEnabled"; | |||||
public const string ProGridsIsExtended = "pgProGridsIsExtended"; | |||||
public const string ProGridsUpgradeURL = "http://u3d.as/content/six-by-seven-studio/pro-grids/3ov"; | |||||
public const string SnapValue = "pgSnapValue"; | |||||
public const string SnapMultiplier = "pgSnapMultiplier"; | |||||
public const string SnapEnabled = "pgSnapEnabled"; | |||||
public const string UseAxisConstraints = "pgUseAxisConstraints"; | |||||
public const string LastOrthoToggledRotation = "pgLastOrthoToggledRotation"; | |||||
public const string BracketIncreaseValue = "pgBracketIncreaseValue"; | |||||
public const string GridUnit = "pg_GridUnit"; | |||||
public const string LockGrid = "pg_LockGrid"; | |||||
public const string LockedGridPivot = "pg_LockedGridPivot"; | |||||
public const string PGVersion = "pg_Version"; | |||||
public const string GridAxis = "pg_GridAxis"; | |||||
public const string PerspGrid = "pg_PerspGrid"; | |||||
public const string SnapScale = "pg_SnapOnScale"; | |||||
public const string PredictiveGrid = "pg_PredictiveGrid"; | |||||
public const string SnapAsGroup = "pg_SnapAsGroup"; | |||||
public const string MajorLineIncrement = "pg_MajorLineIncrement"; | |||||
public const string SyncUnitySnap = "pg_SyncUnitySnap"; | |||||
public const float METER = 1f; | |||||
#if PRO | |||||
public const float CENTIMETER = .01f; | |||||
public const float MILLIMETER = .001f; | |||||
public const float INCH = 0.0253999862840074f; | |||||
public const float FOOT = 0.3048f; | |||||
public const float YARD = 1.09361f; | |||||
public const float PARSEC = 5f; | |||||
#endif | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8b2cff15c28de0f4ba38eafc29cd64fa | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,102 @@ | |||||
#define PRO | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
namespace ProGrids | |||||
{ | |||||
public enum Axis { | |||||
None = 0x0, | |||||
X = 0x1, | |||||
Y = 0x2, | |||||
Z = 0x4, | |||||
NegX = 0x8, | |||||
NegY = 0x16, | |||||
NegZ = 0x32 | |||||
} | |||||
public enum SnapUnit { | |||||
Meter, | |||||
#if PRO | |||||
Centimeter, | |||||
Millimeter, | |||||
Inch, | |||||
Foot, | |||||
Yard, | |||||
Parsec | |||||
#endif | |||||
} | |||||
public static class pg_Enum | |||||
{ | |||||
/** | |||||
* Multiplies a Vector3 using the inverse value of an axis (eg, Axis.Y becomes Vector3(1, 0, 1) ) | |||||
*/ | |||||
public static Vector3 InverseAxisMask(Vector3 v, Axis axis) | |||||
{ | |||||
switch(axis) | |||||
{ | |||||
case Axis.X: | |||||
case Axis.NegX: | |||||
return Vector3.Scale(v, new Vector3(0f, 1f, 1f)); | |||||
case Axis.Y: | |||||
case Axis.NegY: | |||||
return Vector3.Scale(v, new Vector3(1f, 0f, 1f)); | |||||
case Axis.Z: | |||||
case Axis.NegZ: | |||||
return Vector3.Scale(v, new Vector3(1f, 1f, 0f)); | |||||
default: | |||||
return v; | |||||
} | |||||
} | |||||
public static Vector3 AxisMask(Vector3 v, Axis axis) | |||||
{ | |||||
switch(axis) | |||||
{ | |||||
case Axis.X: | |||||
case Axis.NegX: | |||||
return Vector3.Scale(v, new Vector3(1f, 0f, 0f)); | |||||
case Axis.Y: | |||||
case Axis.NegY: | |||||
return Vector3.Scale(v, new Vector3(0f, 1f, 0f)); | |||||
case Axis.Z: | |||||
case Axis.NegZ: | |||||
return Vector3.Scale(v, new Vector3(0f, 0f, 1f)); | |||||
default: | |||||
return v; | |||||
} | |||||
} | |||||
public static float SnapUnitValue(SnapUnit su) | |||||
{ | |||||
switch(su) | |||||
{ | |||||
case SnapUnit.Meter: | |||||
return pg_Constant.METER; | |||||
#if PRO | |||||
case SnapUnit.Centimeter: | |||||
return pg_Constant.CENTIMETER; | |||||
case SnapUnit.Millimeter: | |||||
return pg_Constant.MILLIMETER; | |||||
case SnapUnit.Inch: | |||||
return pg_Constant.INCH; | |||||
case SnapUnit.Foot: | |||||
return pg_Constant.FOOT; | |||||
case SnapUnit.Yard: | |||||
return pg_Constant.YARD; | |||||
case SnapUnit.Parsec: | |||||
return pg_Constant.PARSEC; | |||||
#endif | |||||
default: | |||||
return pg_Constant.METER; | |||||
} | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: d3b407d7cf143004f8e7f9de0969d275 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,71 @@ | |||||
#if UNITY_EDITOR | |||||
using UnityEngine; | |||||
using UnityEditor; | |||||
using System; | |||||
using System.IO; | |||||
using System.Collections.Generic; | |||||
namespace ProGrids | |||||
{ | |||||
[InitializeOnLoad] | |||||
public static class pg_IconUtility | |||||
{ | |||||
const string ICON_FOLDER_PATH = "ProGridsToggles"; | |||||
private static string iconFolderPath = "Assets/ProCore/ProGrids/GUI/ProGridsToggles/"; | |||||
static pg_IconUtility() | |||||
{ | |||||
if(!Directory.Exists(iconFolderPath)) | |||||
{ | |||||
string folder = FindFolder(ICON_FOLDER_PATH); | |||||
if(Directory.Exists(folder)) | |||||
iconFolderPath = folder; | |||||
} | |||||
} | |||||
private static string FindFolder(string folder) | |||||
{ | |||||
#if !UNITY_WEBPLAYER | |||||
string single = folder.Replace("\\", "/").Substring(folder.LastIndexOf('/') + 1); | |||||
string[] matches = Directory.GetDirectories("Assets/", single, SearchOption.AllDirectories); | |||||
foreach(string str in matches) | |||||
{ | |||||
string path = str.Replace("\\", "/"); | |||||
if(path.Contains(folder)) | |||||
{ | |||||
if(!path.EndsWith("/")) | |||||
path += "/"; | |||||
return path; | |||||
} | |||||
} | |||||
#endif | |||||
Debug.LogError("Could not locate ProGrids/GUI/ProGridsToggles folder. The ProGrids folder may be moved, but the contents of ProGrids must remain unmodified."); | |||||
return ""; | |||||
} | |||||
public static Texture2D LoadIcon(string iconName) | |||||
{ | |||||
string iconPath = string.Format("{0}{1}", iconFolderPath, iconName); | |||||
if(!File.Exists(iconPath)) | |||||
{ | |||||
Debug.LogError("ProGrids failed to locate menu image: " + iconName + ".\nThis can happen if the GUI folder is moved or deleted. Deleting and re-importing ProGrids will fix this error."); | |||||
return (Texture2D) null; | |||||
} | |||||
return LoadAssetAtPath<Texture2D>(iconPath); | |||||
} | |||||
static T LoadAssetAtPath<T>(string path) where T : UnityEngine.Object | |||||
{ | |||||
return (T) AssetDatabase.LoadAssetAtPath(path, typeof(T)); | |||||
} | |||||
} | |||||
} | |||||
#endif |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 192dd82c3ebd3b647ae292174a2f36a6 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,23 @@ | |||||
using UnityEngine; | |||||
using System; | |||||
namespace ProGrids | |||||
{ | |||||
/** | |||||
* ProGridsNoSnapAttribute tells ProGrids to skip snapping on this object. | |||||
* Note - On Unity versions less than 5.2 this will not take effect until after a script | |||||
* reload. | |||||
*/ | |||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] | |||||
public class ProGridsNoSnapAttribute : Attribute | |||||
{ | |||||
} | |||||
/** | |||||
* ProGridsConditionalSnapAttribute tells ProGrids to check `bool IsSnapEnabled()` function on this object. | |||||
*/ | |||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] | |||||
public class ProGridsConditionalSnapAttribute : Attribute | |||||
{ | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: a00a369d82c4f7f47ae4dc5c2be474b8 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,47 @@ | |||||
#if UNITY_EDITOR | |||||
using UnityEngine; | |||||
using UnityEditor; | |||||
using System.Linq; | |||||
using System.Collections; | |||||
/** | |||||
* Despite the MonoBehaviour inheritance, this is an Editor-only script. | |||||
*/ | |||||
[ExecuteInEditMode] | |||||
public class pg_SceneMeshRender : MonoBehaviour | |||||
{ | |||||
// HideFlags.DontSaveInEditor isn't exposed for whatever reason, so do the bit math on ints | |||||
// and just cast to HideFlags. | |||||
// HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | |||||
HideFlags SceneCameraHideFlags = (HideFlags) (1 | 4 | 8); | |||||
public Mesh mesh; | |||||
public Material material; | |||||
void OnDestroy() | |||||
{ | |||||
if(mesh) DestroyImmediate(mesh); | |||||
if(material) DestroyImmediate(material); | |||||
} | |||||
void OnRenderObject() | |||||
{ | |||||
// instead of relying on 'SceneCamera' string comparison, check if the hideflags match. | |||||
// this could probably even just check for one bit match, since chances are that any | |||||
// game view camera isn't going to have hideflags set. | |||||
if( (Camera.current.gameObject.hideFlags & SceneCameraHideFlags) != SceneCameraHideFlags || Camera.current.name != "SceneCamera" ) | |||||
return; | |||||
if(material == null || mesh == null) | |||||
{ | |||||
GameObject.DestroyImmediate(this.gameObject); | |||||
// Debug.Log("NULL MESH || MATERIAL"); | |||||
return; | |||||
} | |||||
material.SetPass(0); | |||||
Graphics.DrawMeshNow(mesh, Vector3.zero, Quaternion.identity, 0); | |||||
} | |||||
} | |||||
#endif |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: bb0712ebbf8b03f46a1c36447cee2893 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,369 @@ | |||||
#if UNITY_EDITOR || !(UNITY_WP_8_1 || UNITY_WSA || UNITY_WSA_8_1 || UNITY_WSA_10_0 || UNITY_WINRT || UNITY_WINRT_8_1 || UNITY_WINRT_10_0) | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using System; | |||||
using System.Linq; | |||||
using System.Reflection; | |||||
namespace ProGrids | |||||
{ | |||||
public static class pg_Util | |||||
{ | |||||
public static Color ColorWithString(string value) | |||||
{ | |||||
string valid = "01234567890.,"; | |||||
value = new string(value.Where(c => valid.Contains(c)).ToArray()); | |||||
string[] rgba = value.Split(','); | |||||
// BRIGHT pink | |||||
if(rgba.Length < 4) | |||||
return new Color(1f, 0f, 1f, 1f); | |||||
return new Color( | |||||
float.Parse(rgba[0]), | |||||
float.Parse(rgba[1]), | |||||
float.Parse(rgba[2]), | |||||
float.Parse(rgba[3])); | |||||
} | |||||
private static Vector3 VectorToMask(Vector3 vec) | |||||
{ | |||||
return new Vector3( Mathf.Abs(vec.x) > Mathf.Epsilon ? 1f : 0f, | |||||
Mathf.Abs(vec.y) > Mathf.Epsilon ? 1f : 0f, | |||||
Mathf.Abs(vec.z) > Mathf.Epsilon ? 1f : 0f ); | |||||
} | |||||
private static Axis MaskToAxis(Vector3 vec) | |||||
{ | |||||
Axis axis = Axis.None; | |||||
if( Mathf.Abs(vec.x) > 0 ) axis |= Axis.X; | |||||
if( Mathf.Abs(vec.y) > 0 ) axis |= Axis.Y; | |||||
if( Mathf.Abs(vec.z) > 0 ) axis |= Axis.Z; | |||||
return axis; | |||||
} | |||||
private static Axis BestAxis(Vector3 vec) | |||||
{ | |||||
float x = Mathf.Abs(vec.x); | |||||
float y = Mathf.Abs(vec.y); | |||||
float z = Mathf.Abs(vec.z); | |||||
return (x > y && x > z) ? Axis.X : ((y > x && y > z) ? Axis.Y : Axis.Z); | |||||
} | |||||
public static Axis CalcDragAxis(Vector3 movement, Camera cam) | |||||
{ | |||||
Vector3 mask = VectorToMask(movement); | |||||
if(mask.x + mask.y + mask.z == 2) | |||||
{ | |||||
return MaskToAxis(Vector3.one - mask); | |||||
} | |||||
else | |||||
{ | |||||
switch( MaskToAxis(mask) ) | |||||
{ | |||||
case Axis.X: | |||||
if( Mathf.Abs(Vector3.Dot(cam.transform.forward, Vector3.up)) < Mathf.Abs(Vector3.Dot(cam.transform.forward, Vector3.forward))) | |||||
return Axis.Z; | |||||
else | |||||
return Axis.Y; | |||||
case Axis.Y: | |||||
if( Mathf.Abs(Vector3.Dot(cam.transform.forward, Vector3.right)) < Mathf.Abs(Vector3.Dot(cam.transform.forward, Vector3.forward))) | |||||
return Axis.Z; | |||||
else | |||||
return Axis.X; | |||||
case Axis.Z: | |||||
if( Mathf.Abs(Vector3.Dot(cam.transform.forward, Vector3.right)) < Mathf.Abs(Vector3.Dot(cam.transform.forward, Vector3.up))) | |||||
return Axis.Y; | |||||
else | |||||
return Axis.X; | |||||
default: | |||||
return Axis.None; | |||||
} | |||||
} | |||||
} | |||||
public static float ValueFromMask(Vector3 val, Vector3 mask) | |||||
{ | |||||
if(Mathf.Abs(mask.x) > .0001f) | |||||
return val.x; | |||||
else if(Mathf.Abs(mask.y) > .0001f) | |||||
return val.y; | |||||
else | |||||
return val.z; | |||||
} | |||||
public static Vector3 SnapValue(Vector3 val, float snapValue) | |||||
{ | |||||
float _x = val.x, _y = val.y, _z = val.z; | |||||
return new Vector3( | |||||
Snap(_x, snapValue), | |||||
Snap(_y, snapValue), | |||||
Snap(_z, snapValue) | |||||
); | |||||
} | |||||
/** | |||||
* Fetch a type with name and optional assembly name. `type` should include namespace. | |||||
*/ | |||||
private static Type GetType(string type, string assembly = null) | |||||
{ | |||||
Type t = Type.GetType(type); | |||||
if(t == null) | |||||
{ | |||||
IEnumerable<Assembly> assemblies = AppDomain.CurrentDomain.GetAssemblies(); | |||||
if(assembly != null) | |||||
assemblies = assemblies.Where(x => x.FullName.Contains(assembly)); | |||||
foreach(Assembly ass in assemblies) | |||||
{ | |||||
t = ass.GetType(type); | |||||
if(t != null) | |||||
return t; | |||||
} | |||||
} | |||||
return t; | |||||
} | |||||
public static void SetUnityGridEnabled(bool isEnabled) | |||||
{ | |||||
try | |||||
{ | |||||
Type annotationUtility = GetType("UnityEditor.AnnotationUtility"); | |||||
PropertyInfo pi = annotationUtility.GetProperty("showGrid", BindingFlags.NonPublic | BindingFlags.Static); | |||||
pi.SetValue(null, isEnabled, BindingFlags.NonPublic | BindingFlags.Static, null, null, null); | |||||
} | |||||
catch | |||||
{} | |||||
} | |||||
public static bool GetUnityGridEnabled() | |||||
{ | |||||
try | |||||
{ | |||||
Type annotationUtility = GetType("UnityEditor.AnnotationUtility"); | |||||
PropertyInfo pi = annotationUtility.GetProperty("showGrid", BindingFlags.NonPublic | BindingFlags.Static); | |||||
return (bool) pi.GetValue(null, null); | |||||
} | |||||
catch | |||||
{} | |||||
return false; | |||||
} | |||||
const float EPSILON = .0001f; | |||||
public static Vector3 SnapValue(Vector3 val, Vector3 mask, float snapValue) | |||||
{ | |||||
float _x = val.x, _y = val.y, _z = val.z; | |||||
return new Vector3( | |||||
( Mathf.Abs(mask.x) < EPSILON ? _x : Snap(_x, snapValue) ), | |||||
( Mathf.Abs(mask.y) < EPSILON ? _y : Snap(_y, snapValue) ), | |||||
( Mathf.Abs(mask.z) < EPSILON ? _z : Snap(_z, snapValue) ) | |||||
); | |||||
} | |||||
public static Vector3 SnapToCeil(Vector3 val, Vector3 mask, float snapValue) | |||||
{ | |||||
float _x = val.x, _y = val.y, _z = val.z; | |||||
return new Vector3( | |||||
( Mathf.Abs(mask.x) < EPSILON ? _x : SnapToCeil(_x, snapValue) ), | |||||
( Mathf.Abs(mask.y) < EPSILON ? _y : SnapToCeil(_y, snapValue) ), | |||||
( Mathf.Abs(mask.z) < EPSILON ? _z : SnapToCeil(_z, snapValue) ) | |||||
); | |||||
} | |||||
public static Vector3 SnapToFloor(Vector3 val, float snapValue) | |||||
{ | |||||
float _x = val.x, _y = val.y, _z = val.z; | |||||
return new Vector3( | |||||
SnapToFloor(_x, snapValue), | |||||
SnapToFloor(_y, snapValue), | |||||
SnapToFloor(_z, snapValue) | |||||
); | |||||
} | |||||
public static Vector3 SnapToFloor(Vector3 val, Vector3 mask, float snapValue) | |||||
{ | |||||
float _x = val.x, _y = val.y, _z = val.z; | |||||
return new Vector3( | |||||
( Mathf.Abs(mask.x) < EPSILON ? _x : SnapToFloor(_x, snapValue) ), | |||||
( Mathf.Abs(mask.y) < EPSILON ? _y : SnapToFloor(_y, snapValue) ), | |||||
( Mathf.Abs(mask.z) < EPSILON ? _z : SnapToFloor(_z, snapValue) ) | |||||
); | |||||
} | |||||
public static float Snap(float val, float round) | |||||
{ | |||||
return round * Mathf.Round(val / round); | |||||
} | |||||
public static float SnapToFloor(float val, float snapValue) | |||||
{ | |||||
return snapValue * Mathf.Floor(val / snapValue); | |||||
} | |||||
public static float SnapToCeil(float val, float snapValue) | |||||
{ | |||||
return snapValue * Mathf.Ceil(val / snapValue); | |||||
} | |||||
public static Vector3 CeilFloor(Vector3 v) | |||||
{ | |||||
v.x = v.x < 0 ? -1 : 1; | |||||
v.y = v.y < 0 ? -1 : 1; | |||||
v.z = v.z < 0 ? -1 : 1; | |||||
return v; | |||||
} | |||||
abstract class SnapEnabledOverride | |||||
{ | |||||
public abstract bool IsEnabled(); | |||||
} | |||||
class SnapIsEnabledOverride : SnapEnabledOverride | |||||
{ | |||||
bool m_SnapIsEnabled; | |||||
public SnapIsEnabledOverride(bool snapIsEnabled) | |||||
{ | |||||
m_SnapIsEnabled = snapIsEnabled; | |||||
} | |||||
public override bool IsEnabled() { return m_SnapIsEnabled; } | |||||
} | |||||
class ConditionalSnapOverride : SnapEnabledOverride | |||||
{ | |||||
public System.Func<bool> m_IsEnabledDelegate; | |||||
public ConditionalSnapOverride(System.Func<bool> d) | |||||
{ | |||||
m_IsEnabledDelegate = d; | |||||
} | |||||
public override bool IsEnabled() { return m_IsEnabledDelegate(); } | |||||
} | |||||
private static Dictionary<Transform, SnapEnabledOverride> m_SnapOverrideCache = new Dictionary<Transform, SnapEnabledOverride>(); | |||||
private static Dictionary<Type, bool> m_NoSnapAttributeTypeCache = new Dictionary<Type, bool>(); | |||||
private static Dictionary<Type, MethodInfo> m_ConditionalSnapAttributeCache = new Dictionary<Type, MethodInfo>(); | |||||
public static void ClearSnapEnabledCache() | |||||
{ | |||||
m_SnapOverrideCache.Clear(); | |||||
} | |||||
public static bool SnapIsEnabled(Transform t) | |||||
{ | |||||
SnapEnabledOverride so; | |||||
if(m_SnapOverrideCache.TryGetValue(t, out so)) | |||||
return so.IsEnabled(); | |||||
object[] attribs = null; | |||||
foreach(Component c in t.GetComponents<MonoBehaviour>()) | |||||
{ | |||||
if(c == null) | |||||
continue; | |||||
Type type = c.GetType(); | |||||
bool hasNoSnapAttrib; | |||||
if(m_NoSnapAttributeTypeCache.TryGetValue(type, out hasNoSnapAttrib)) | |||||
{ | |||||
if(hasNoSnapAttrib) | |||||
{ | |||||
m_SnapOverrideCache.Add(t, new SnapIsEnabledOverride(!hasNoSnapAttrib)); | |||||
return true; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
attribs = type.GetCustomAttributes(true); | |||||
hasNoSnapAttrib = attribs.Any(x => x != null && x.ToString().Contains("ProGridsNoSnap")); | |||||
m_NoSnapAttributeTypeCache.Add(type, hasNoSnapAttrib); | |||||
if(hasNoSnapAttrib) | |||||
{ | |||||
m_SnapOverrideCache.Add(t, new SnapIsEnabledOverride(!hasNoSnapAttrib)); | |||||
return true; | |||||
} | |||||
} | |||||
MethodInfo mi; | |||||
if(m_ConditionalSnapAttributeCache.TryGetValue(type, out mi)) | |||||
{ | |||||
if(mi != null) | |||||
{ | |||||
m_SnapOverrideCache.Add(t, new ConditionalSnapOverride(() => { return (bool) mi.Invoke(c, null); })); | |||||
return (bool) mi.Invoke(c, null); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
if( attribs.Any(x => x != null && x.ToString().Contains("ProGridsConditionalSnap")) ) | |||||
{ | |||||
mi = type.GetMethod("IsSnapEnabled", BindingFlags.Instance | BindingFlags.FlattenHierarchy | BindingFlags.NonPublic | BindingFlags.Public); | |||||
m_ConditionalSnapAttributeCache.Add(type, mi); | |||||
if(mi != null) | |||||
{ | |||||
m_SnapOverrideCache.Add(t, new ConditionalSnapOverride(() => { return (bool) mi.Invoke(c, null); })); | |||||
return (bool) mi.Invoke(c, null); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
m_ConditionalSnapAttributeCache.Add(type, null); | |||||
} | |||||
} | |||||
} | |||||
m_SnapOverrideCache.Add(t, new SnapIsEnabledOverride(true)); | |||||
return true; | |||||
} | |||||
} | |||||
public static class PGExtensions | |||||
{ | |||||
public static bool Contains(this Transform[] t_arr, Transform t) | |||||
{ | |||||
for(int i = 0; i < t_arr.Length; i++) | |||||
if(t_arr[i] == t) | |||||
return true; | |||||
return false; | |||||
} | |||||
public static float Sum(this Vector3 v) | |||||
{ | |||||
return v[0] + v[1] + v[2]; | |||||
} | |||||
public static bool InFrustum(this Camera cam, Vector3 point) | |||||
{ | |||||
Vector3 p = cam.WorldToViewportPoint(point); | |||||
return (p.x >= 0f && p.x <= 1f) && | |||||
(p.y >= 0f && p.y <= 1f) && | |||||
p.z >= 0f; | |||||
} | |||||
} | |||||
} | |||||
#endif |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8e12ec5ca21bb5842aa4a54b18874a11 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,10 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 7e7089ffb8ce16f48a7ab8eb8e090929 | |||||
folderAsset: yes | |||||
timeCreated: 1518451281 | |||||
licenseType: Store | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 0ab80081d3e2f274ba76a692cdcfa8d9 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,451 @@ | |||||
using UnityEngine; | |||||
using UnityEditor; | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
namespace ProGrids | |||||
{ | |||||
public class pg_GridRenderer | |||||
{ | |||||
static readonly HideFlags PG_HIDE_FLAGS = HideFlags.HideAndDontSave; | |||||
const string PREVIEW_OBJECT_NAME = "ProGridsGridObject"; | |||||
const string MATERIAL_OBJECT_NAME = "ProGridsMaterialObject"; | |||||
const string MESH_OBJECT_NAME = "ProGridsMeshObject"; | |||||
const string GRID_SHADER = "Hidden/ProGrids/pg_GridShader"; | |||||
const int MAX_LINES = 256; | |||||
static GameObject gridObject; | |||||
static Mesh gridMesh; | |||||
static Material gridMaterial; | |||||
public static int majorLineIncrement = 10; | |||||
/** | |||||
* Destroy any existing render objects, then initialize new ones. | |||||
*/ | |||||
public static void Init() | |||||
{ | |||||
Destroy(); | |||||
gridObject = EditorUtility.CreateGameObjectWithHideFlags(PREVIEW_OBJECT_NAME, PG_HIDE_FLAGS, new System.Type[2]{typeof(MeshFilter), typeof(MeshRenderer)}); | |||||
majorLineIncrement = EditorPrefs.GetInt(pg_Constant.MajorLineIncrement, 10); | |||||
if(majorLineIncrement < 2) | |||||
majorLineIncrement = 2; | |||||
// Force the mesh to only render in SceneView | |||||
pg_SceneMeshRender renderer = gridObject.AddComponent<pg_SceneMeshRender>(); | |||||
gridMesh = new Mesh(); | |||||
gridMesh.name = MESH_OBJECT_NAME; | |||||
gridMesh.hideFlags = PG_HIDE_FLAGS; | |||||
gridMaterial = new Material(Shader.Find(GRID_SHADER)); | |||||
gridMaterial.name = MATERIAL_OBJECT_NAME; | |||||
gridMaterial.hideFlags = PG_HIDE_FLAGS; | |||||
renderer.mesh = gridMesh; | |||||
renderer.material = gridMaterial; | |||||
} | |||||
public static void Destroy() | |||||
{ | |||||
DestoryObjectsWithName(MESH_OBJECT_NAME, typeof(Mesh)); | |||||
DestoryObjectsWithName(MATERIAL_OBJECT_NAME, typeof(Material)); | |||||
DestoryObjectsWithName(PREVIEW_OBJECT_NAME, typeof(GameObject)); | |||||
} | |||||
static void DestoryObjectsWithName(string Name, System.Type type) | |||||
{ | |||||
IEnumerable go = Resources.FindObjectsOfTypeAll(type).Where(x => x.name.Contains(Name)); | |||||
foreach(Object t in go) | |||||
{ | |||||
GameObject.DestroyImmediate(t); | |||||
} | |||||
} | |||||
private static int tan_iter, bit_iter, max = MAX_LINES, div = 1; | |||||
/** | |||||
* Returns the distance this grid is drawing | |||||
*/ | |||||
public static float DrawPlane(Camera cam, Vector3 pivot, Vector3 tangent, Vector3 bitangent, float snapValue, Color color, float alphaBump) | |||||
{ | |||||
if(!gridMesh || !gridMaterial || !gridObject) | |||||
Init(); | |||||
gridMaterial.SetFloat("_AlphaCutoff", .1f); | |||||
gridMaterial.SetFloat("_AlphaFade", .6f); | |||||
pivot = pg_Util.SnapValue(pivot, snapValue); | |||||
Vector3 p = cam.WorldToViewportPoint(pivot); | |||||
bool inFrustum = (p.x >= 0f && p.x <= 1f) && | |||||
(p.y >= 0f && p.y <= 1f) && | |||||
p.z >= 0f; | |||||
float[] distances = GetDistanceToFrustumPlanes(cam, pivot, tangent, bitangent, 24f); | |||||
if(inFrustum) | |||||
{ | |||||
tan_iter = (int)(Mathf.Ceil( (Mathf.Abs(distances[0]) + Mathf.Abs(distances[2]))/snapValue )); | |||||
bit_iter = (int)(Mathf.Ceil( (Mathf.Abs(distances[1]) + Mathf.Abs(distances[3]))/snapValue )); | |||||
max = Mathf.Max( tan_iter, bit_iter ); | |||||
// if the max is around 3x greater than min, we're probably skewing the camera at near-plane | |||||
// angle, so use the min instead. | |||||
if(max > Mathf.Min(tan_iter, bit_iter) * 2) | |||||
max = (int) Mathf.Min(tan_iter, bit_iter) * 2; | |||||
div = 1; | |||||
float dot = Vector3.Dot( cam.transform.position-pivot, Vector3.Cross(tangent, bitangent) ); | |||||
if(max > MAX_LINES) | |||||
{ | |||||
if(Vector3.Distance(cam.transform.position, pivot) > 50f * snapValue && Mathf.Abs(dot) > .8f) | |||||
{ | |||||
while(max/div > MAX_LINES) | |||||
div += div; | |||||
} | |||||
else | |||||
{ | |||||
max = MAX_LINES; | |||||
} | |||||
} | |||||
} | |||||
// origin, tan, bitan, increment, iterations, divOffset, color, primary alpha bump | |||||
DrawFullGrid(cam, pivot, tangent, bitangent, snapValue*div, max/div, div, color, alphaBump); | |||||
return ((snapValue*div)*(max/div)); | |||||
} | |||||
public static void DrawGridPerspective(Camera cam, Vector3 pivot, float snapValue, Color[] colors, float alphaBump) | |||||
{ | |||||
if(!gridMesh || !gridMaterial || !gridObject) | |||||
Init(); | |||||
gridMaterial.SetFloat("_AlphaCutoff", 0f); | |||||
gridMaterial.SetFloat("_AlphaFade", 0f); | |||||
Vector3 camDir = (pivot - cam.transform.position).normalized; | |||||
pivot = pg_Util.SnapValue(pivot, snapValue); | |||||
// Used to flip the grid to match whatever direction the cam is currently | |||||
// coming at the pivot from | |||||
Vector3 right = camDir.x < 0f ? Vector3.right : Vector3.right * -1f; | |||||
Vector3 up = camDir.y < 0f ? Vector3.up : Vector3.up * -1f; | |||||
Vector3 forward = camDir.z < 0f ? Vector3.forward : Vector3.forward * -1f; | |||||
// Get intersecting point for each axis, if it exists | |||||
Ray ray_x = new Ray(pivot, right); | |||||
Ray ray_y = new Ray(pivot, up); | |||||
Ray ray_z = new Ray(pivot, forward); | |||||
float x_dist = 10f, y_dist = 10f, z_dist = 10f; | |||||
bool x_intersect = false, y_intersect = false, z_intersect = false; | |||||
Plane[] planes = GeometryUtility.CalculateFrustumPlanes(cam); | |||||
foreach(Plane p in planes) | |||||
{ | |||||
float dist; | |||||
float t = 0; | |||||
if(p.Raycast(ray_x, out dist)) | |||||
{ | |||||
t = Vector3.Distance(pivot, ray_x.GetPoint(dist)); | |||||
if(t < x_dist || !x_intersect) | |||||
{ | |||||
x_intersect = true; | |||||
x_dist = t; | |||||
} | |||||
} | |||||
if(p.Raycast(ray_y, out dist)) | |||||
{ | |||||
t = Vector3.Distance(pivot, ray_y.GetPoint(dist)); | |||||
if(t < y_dist || !y_intersect) | |||||
{ | |||||
y_intersect = true; | |||||
y_dist = t; | |||||
} | |||||
} | |||||
if(p.Raycast(ray_z, out dist)) | |||||
{ | |||||
t = Vector3.Distance(pivot, ray_z.GetPoint(dist)); | |||||
if(t < z_dist || !z_intersect) | |||||
{ | |||||
z_intersect = true; | |||||
z_dist = t; | |||||
} | |||||
} | |||||
} | |||||
int x_iter = (int)(Mathf.Ceil(Mathf.Max(x_dist, y_dist))/snapValue); | |||||
int y_iter = (int)(Mathf.Ceil(Mathf.Max(x_dist, z_dist))/snapValue); | |||||
int z_iter = (int)(Mathf.Ceil(Mathf.Max(z_dist, y_dist))/snapValue); | |||||
int max = Mathf.Max( Mathf.Max(x_iter, y_iter), z_iter ); | |||||
int div = 1; | |||||
while(max/div> MAX_LINES) | |||||
{ | |||||
div++; | |||||
} | |||||
Vector3[] vertices_t = null; | |||||
Vector3[] normals_t = null; | |||||
Color[] colors_t = null; | |||||
int[] indices_t = null; | |||||
List<Vector3> vertices_m = new List<Vector3>(); | |||||
List<Vector3> normals_m = new List<Vector3>(); | |||||
List<Color> colors_m = new List<Color>(); | |||||
List<int> indices_m = new List<int>(); | |||||
// X plane | |||||
DrawHalfGrid(cam, pivot, up, right, snapValue*div, x_iter/div, colors[0], alphaBump, out vertices_t, out normals_t, out colors_t, out indices_t, 0); | |||||
vertices_m.AddRange(vertices_t); | |||||
normals_m.AddRange(normals_t); | |||||
colors_m.AddRange(colors_t); | |||||
indices_m.AddRange(indices_t); | |||||
// Y plane | |||||
DrawHalfGrid(cam, pivot, right, forward, snapValue*div, y_iter/div, colors[1], alphaBump, out vertices_t, out normals_t, out colors_t, out indices_t, vertices_m.Count); | |||||
vertices_m.AddRange(vertices_t); | |||||
normals_m.AddRange(normals_t); | |||||
colors_m.AddRange(colors_t); | |||||
indices_m.AddRange(indices_t); | |||||
// Z plane | |||||
DrawHalfGrid(cam, pivot, forward, up, snapValue*div, z_iter/div, colors[2], alphaBump, out vertices_t, out normals_t, out colors_t, out indices_t, vertices_m.Count); | |||||
vertices_m.AddRange(vertices_t); | |||||
normals_m.AddRange(normals_t); | |||||
colors_m.AddRange(colors_t); | |||||
indices_m.AddRange(indices_t); | |||||
gridMesh.Clear(); | |||||
gridMesh.vertices = vertices_m.ToArray(); | |||||
gridMesh.normals = normals_m.ToArray(); | |||||
gridMesh.subMeshCount = 1; | |||||
gridMesh.uv = new Vector2[vertices_m.Count]; | |||||
gridMesh.colors = colors_m.ToArray(); | |||||
gridMesh.SetIndices(indices_m.ToArray(), MeshTopology.Lines, 0); | |||||
} | |||||
private static void DrawHalfGrid(Camera cam, Vector3 pivot, Vector3 tan, Vector3 bitan, float increment, int iterations, Color secondary, float alphaBump, | |||||
out Vector3[] vertices, | |||||
out Vector3[] normals, | |||||
out Color[] colors, | |||||
out int[] indices, int offset) | |||||
{ | |||||
Color primary = secondary; | |||||
primary.a += alphaBump; | |||||
float len = increment * iterations; | |||||
int highlightOffsetTan = (int)((pg_Util.ValueFromMask(pivot, tan) % (increment * majorLineIncrement)) / increment); | |||||
int highlightOffsetBitan = (int)((pg_Util.ValueFromMask(pivot, bitan) % (increment * majorLineIncrement)) / increment); | |||||
iterations++; | |||||
// this could only use 3 verts per line | |||||
float fade = .75f; | |||||
float fadeDist = len * fade; | |||||
Vector3 nrm = Vector3.Cross(tan, bitan); | |||||
vertices = new Vector3[iterations*6-3]; | |||||
normals = new Vector3[iterations*6-3]; | |||||
indices = new int[iterations*8-4]; | |||||
colors = new Color[iterations*6-3]; | |||||
vertices[0] = pivot; | |||||
vertices[1] = (pivot + bitan*fadeDist); | |||||
vertices[2] = (pivot + bitan*len); | |||||
normals[0] = nrm; | |||||
normals[1] = nrm; | |||||
normals[2] = nrm; | |||||
indices[0] = 0 + offset; | |||||
indices[1] = 1 + offset; | |||||
indices[2] = 1 + offset; | |||||
indices[3] = 2 + offset; | |||||
colors[0] = primary; | |||||
colors[1] = primary; | |||||
colors[2] = primary; | |||||
colors[2].a = 0f; | |||||
int n = 4; | |||||
int v = 3; | |||||
for(int i = 1; i < iterations; i++) | |||||
{ | |||||
// MeshTopology doesn't exist prior to Unity 4 | |||||
vertices[v+0] = pivot + i * tan * increment; | |||||
vertices[v+1] = (pivot + bitan*fadeDist) + i * tan * increment; | |||||
vertices[v+2] = (pivot + bitan*len) + i * tan * increment; | |||||
vertices[v+3] = pivot + i * bitan * increment; | |||||
vertices[v+4] = (pivot + tan*fadeDist) + i * bitan * increment; | |||||
vertices[v+5] = (pivot + tan*len) + i * bitan * increment; | |||||
normals[v+0] = nrm; | |||||
normals[v+1] = nrm; | |||||
normals[v+2] = nrm; | |||||
normals[v+3] = nrm; | |||||
normals[v+4] = nrm; | |||||
normals[v+5] = nrm; | |||||
indices[n+0] = v + 0 + offset; | |||||
indices[n+1] = v + 1 + offset; | |||||
indices[n+2] = v + 1 + offset; | |||||
indices[n+3] = v + 2 + offset; | |||||
indices[n+4] = v + 3 + offset; | |||||
indices[n+5] = v + 4 + offset; | |||||
indices[n+6] = v + 4 + offset; | |||||
indices[n+7] = v + 5 + offset; | |||||
float alpha = (i/(float)iterations); | |||||
alpha = alpha < fade ? 1f : 1f - ( (alpha-fade)/(1-fade) ); | |||||
Color col = (i+highlightOffsetTan) % majorLineIncrement == 0 ? primary : secondary; | |||||
col.a *= alpha; | |||||
colors[v+0] = col; | |||||
colors[v+1] = col; | |||||
colors[v+2] = col; | |||||
colors[v+2].a = 0f; | |||||
col = (i+highlightOffsetBitan) % majorLineIncrement == 0 ? primary : secondary; | |||||
col.a *= alpha; | |||||
colors[v+3] = col; | |||||
colors[v+4] = col; | |||||
colors[v+5] = col; | |||||
colors[v+5].a = 0f; | |||||
n += 8; | |||||
v += 6; | |||||
} | |||||
} | |||||
/** | |||||
* Draws a plane grid using pivot point, the right and forward directions, and how far each direction should extend | |||||
*/ | |||||
private static void DrawFullGrid(Camera cam, Vector3 pivot, Vector3 tan, Vector3 bitan, float increment, int iterations, int div, Color secondary, float alphaBump) | |||||
{ | |||||
Color primary = secondary; | |||||
primary.a += alphaBump; | |||||
float len = iterations * increment; | |||||
iterations++; | |||||
Vector3 start = pivot - tan*(len/2f) - bitan*(len/2f); | |||||
start = pg_Util.SnapValue(start, bitan+tan, increment); | |||||
float inc = increment; | |||||
int highlightOffsetTan = (int)((pg_Util.ValueFromMask(start, tan) % (inc*majorLineIncrement)) / inc); | |||||
int highlightOffsetBitan = (int)((pg_Util.ValueFromMask(start, bitan) % (inc*majorLineIncrement)) / inc); | |||||
Vector3[] lines = new Vector3[iterations * 4]; | |||||
int[] indices = new int[iterations * 4]; | |||||
Color[] colors = new Color[iterations * 4]; | |||||
int v = 0, t = 0; | |||||
for(int i = 0; i < iterations; i++) | |||||
{ | |||||
Vector3 a = start + tan * i * increment; | |||||
Vector3 b = start + bitan * i * increment; | |||||
lines[v+0] = a; | |||||
lines[v+1] = a + bitan * len; | |||||
lines[v+2] = b; | |||||
lines[v+3] = b + tan * len; | |||||
indices[t++] = v; | |||||
indices[t++] = v+1; | |||||
indices[t++] = v+2; | |||||
indices[t++] = v+3; | |||||
Color col = (i + highlightOffsetTan) % majorLineIncrement == 0 ? primary : secondary; | |||||
// tan | |||||
colors[v+0] = col; | |||||
colors[v+1] = col; | |||||
col = (i + highlightOffsetBitan) % majorLineIncrement == 0 ? primary : secondary; | |||||
// bitan | |||||
colors[v+2] = col; | |||||
colors[v+3] = col; | |||||
v += 4; | |||||
} | |||||
Vector3 nrm = Vector3.Cross(tan, bitan); | |||||
Vector3[] nrms = new Vector3[lines.Length]; | |||||
for(int i = 0; i < lines.Length; i++) | |||||
nrms[i] = nrm; | |||||
gridMesh.Clear(); | |||||
gridMesh.vertices = lines; | |||||
gridMesh.normals = nrms; | |||||
gridMesh.subMeshCount = 1; | |||||
gridMesh.uv = new Vector2[lines.Length]; | |||||
gridMesh.colors = colors; | |||||
gridMesh.SetIndices(indices, MeshTopology.Lines, 0); | |||||
} | |||||
/** | |||||
* \brief Returns the distance from pivot to frustum plane in the order of | |||||
* float[] { tan, bitan, -tan, -bitan } | |||||
*/ | |||||
private static float[] GetDistanceToFrustumPlanes(Camera cam, Vector3 pivot, Vector3 tan, Vector3 bitan, float minDist) | |||||
{ | |||||
Ray[] rays = new Ray[4] | |||||
{ | |||||
new Ray(pivot, tan), | |||||
new Ray(pivot, bitan), | |||||
new Ray(pivot, -tan), | |||||
new Ray(pivot, -bitan) | |||||
}; | |||||
float[] intersects = new float[4] { minDist, minDist, minDist, minDist }; | |||||
bool[] intersection_found = new bool[4] { false, false, false, false }; | |||||
Plane[] planes = GeometryUtility.CalculateFrustumPlanes(cam); | |||||
foreach(Plane p in planes) | |||||
{ | |||||
float dist; | |||||
float t = 0; | |||||
for(int i = 0; i < 4; i++) | |||||
{ | |||||
if(p.Raycast(rays[i], out dist)) | |||||
{ | |||||
t = Vector3.Distance(pivot, rays[i].GetPoint(dist)); | |||||
if(t < intersects[i] || !intersection_found[i]) | |||||
{ | |||||
intersection_found[i] = true; | |||||
intersects[i] = Mathf.Max(minDist, t); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
return intersects; | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 6367e9291991f466897f892a41dd75ff | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,78 @@ | |||||
using UnityEngine; | |||||
using UnityEditor; | |||||
using System.Collections; | |||||
namespace ProGrids | |||||
{ | |||||
public class pg_ParameterWindow : EditorWindow | |||||
{ | |||||
public pg_Editor editor; | |||||
GUIContent gc_predictiveGrid = new GUIContent("Predictive Grid", "If enabled, the grid will automatically render at the optimal axis based on movement."); | |||||
GUIContent gc_snapAsGroup = new GUIContent("Snap as Group", "If enabled, selected objects will keep their relative offsets when moving. If disabled, every object in the selection is snapped to grid independently."); | |||||
void OnGUI() | |||||
{ | |||||
GUILayout.Label("Snap Settings", EditorStyles.boldLabel); | |||||
float snap = editor.GetSnapIncrement(); | |||||
EditorGUI.BeginChangeCheck(); | |||||
snap = EditorGUILayout.FloatField("Snap Value", snap); | |||||
if(EditorGUI.EndChangeCheck()) | |||||
editor.SetSnapIncrement(snap); | |||||
EditorGUI.BeginChangeCheck(); | |||||
int majorLineIncrement = EditorPrefs.GetInt(pg_Constant.MajorLineIncrement, 10); | |||||
majorLineIncrement = EditorGUILayout.IntField("Major Line Increment", majorLineIncrement); | |||||
majorLineIncrement = majorLineIncrement < 2 ? 2 : majorLineIncrement > 128 ? 128 : majorLineIncrement; | |||||
if(EditorGUI.EndChangeCheck()) | |||||
{ | |||||
EditorPrefs.SetInt(pg_Constant.MajorLineIncrement, majorLineIncrement); | |||||
pg_GridRenderer.majorLineIncrement = majorLineIncrement; | |||||
pg_Editor.ForceRepaint(); | |||||
} | |||||
editor.ScaleSnapEnabled = EditorGUILayout.Toggle("Snap On Scale", editor.ScaleSnapEnabled); | |||||
SnapUnit _gridUnits = (SnapUnit)(EditorPrefs.HasKey(pg_Constant.GridUnit) ? EditorPrefs.GetInt(pg_Constant.GridUnit) : 0); | |||||
bool snapAsGroup = editor.snapAsGroup; | |||||
snapAsGroup = EditorGUILayout.Toggle(gc_snapAsGroup, snapAsGroup); | |||||
if(snapAsGroup != editor.snapAsGroup) | |||||
editor.snapAsGroup = snapAsGroup; | |||||
EditorGUI.BeginChangeCheck(); | |||||
_gridUnits = (SnapUnit)EditorGUILayout.EnumPopup("Grid Units", _gridUnits); | |||||
EditorGUI.BeginChangeCheck(); | |||||
editor.angleValue = EditorGUILayout.Slider("Angle", editor.angleValue, 0f, 180f); | |||||
if(EditorGUI.EndChangeCheck()) | |||||
SceneView.RepaintAll(); | |||||
if( EditorGUI.EndChangeCheck() ) | |||||
{ | |||||
EditorPrefs.SetInt(pg_Constant.GridUnit, (int) _gridUnits); | |||||
editor.LoadPreferences(); | |||||
} | |||||
bool tmp = editor.predictiveGrid; | |||||
tmp = EditorGUILayout.Toggle(gc_predictiveGrid, tmp); | |||||
if( tmp != editor.predictiveGrid ) | |||||
{ | |||||
editor.predictiveGrid = tmp; | |||||
EditorPrefs.SetBool(pg_Constant.PredictiveGrid, tmp); | |||||
} | |||||
GUILayout.FlexibleSpace(); | |||||
if( GUILayout.Button("Done")) | |||||
this.Close(); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 361cb9f8460027f4a88a1b9610de18c0 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,176 @@ | |||||
using UnityEngine; | |||||
using UnityEditor; | |||||
using System.Collections; | |||||
namespace ProGrids | |||||
{ | |||||
public class pg_Preferences | |||||
{ | |||||
static Color _gridColorX; | |||||
static Color _gridColorY; | |||||
static Color _gridColorZ; | |||||
static float _alphaBump; | |||||
static bool _scaleSnapEnabled; | |||||
static int _snapMethod; | |||||
static float _BracketIncreaseValue; | |||||
static SnapUnit _GridUnits; | |||||
static bool _syncUnitySnap; | |||||
static KeyCode _IncreaseGridSize = KeyCode.Equals; | |||||
static KeyCode _DecreaseGridSize = KeyCode.Minus; | |||||
static KeyCode _NudgePerspectiveBackward = KeyCode.LeftBracket; | |||||
static KeyCode _NudgePerspectiveForward = KeyCode.RightBracket; | |||||
static KeyCode _NudgePerspectiveReset = KeyCode.Alpha0; | |||||
static KeyCode _CyclePerspective = KeyCode.Backslash; | |||||
/** Defaults **/ | |||||
public static Color GRID_COLOR_X = new Color(.9f, .46f, .46f, .15f); | |||||
public static Color GRID_COLOR_Y = new Color(.46f, .9f, .46f, .15f); | |||||
public static Color GRID_COLOR_Z = new Color(.46f, .46f, .9f, .15f); | |||||
public static float ALPHA_BUMP = .25f; | |||||
public static bool USE_AXIS_CONSTRAINTS = false; | |||||
public static bool SHOW_GRID = true; | |||||
static string[] SnapMethod = new string[] | |||||
{ | |||||
"Snap on Selected Axis", | |||||
"Snap on All Axes" | |||||
}; | |||||
static int[] SnapVals = new int[] { 1, 0 }; | |||||
static bool prefsLoaded = false; | |||||
[PreferenceItem("ProGrids")] | |||||
public static void PreferencesGUI() | |||||
{ | |||||
if (!prefsLoaded) | |||||
prefsLoaded = LoadPreferences(); | |||||
// EditorGUILayout.HelpBox("Changes will take effect on the next ProGrids open.", MessageType.Info); | |||||
GUILayout.Label("Grid Colors per Axis", EditorStyles.boldLabel); | |||||
_gridColorX = EditorGUILayout.ColorField("X Axis", _gridColorX); | |||||
_gridColorY = EditorGUILayout.ColorField("Y Axis", _gridColorY); | |||||
_gridColorZ = EditorGUILayout.ColorField("Z Axis", _gridColorZ); | |||||
_alphaBump = EditorGUILayout.Slider(new GUIContent("Tenth Line Alpha", "Every 10th line will have it's alpha value bumped by this amount."), _alphaBump, 0f, 1f); | |||||
// not used | |||||
// _BracketIncreaseValue = EditorGUILayout.FloatField(new GUIContent("Grid Increment Value", "Affects the amount by which the bracket keys will increment or decrement that snap value."), _BracketIncreaseValue); | |||||
_GridUnits = (SnapUnit)EditorGUILayout.EnumPopup("Grid Units", _GridUnits); | |||||
_scaleSnapEnabled = EditorGUILayout.Toggle("Snap On Scale", _scaleSnapEnabled); | |||||
// GUILayout.BeginHorizontal(); | |||||
// EditorGUILayout.PrefixLabel(new GUIContent("Axis Constraints", "If toggled, objects will be automatically grid aligned on all axes when moving.")); | |||||
_snapMethod = EditorGUILayout.IntPopup("Snap Method", _snapMethod, SnapMethod, SnapVals); | |||||
_syncUnitySnap = EditorGUILayout.Toggle("Sync w/ Unity Snap", _syncUnitySnap); | |||||
// GUILayout.EndHorizontal(); | |||||
GUILayout.Label("Shortcuts", EditorStyles.boldLabel); | |||||
_IncreaseGridSize = (KeyCode)EditorGUILayout.EnumPopup("Increase Grid Size", _IncreaseGridSize); | |||||
_DecreaseGridSize = (KeyCode)EditorGUILayout.EnumPopup("Decrease Grid Size", _DecreaseGridSize); | |||||
_NudgePerspectiveBackward = (KeyCode)EditorGUILayout.EnumPopup("Nudge Perspective Backward", _NudgePerspectiveBackward); | |||||
_NudgePerspectiveForward = (KeyCode)EditorGUILayout.EnumPopup("Nudge Perspective Forward", _NudgePerspectiveForward); | |||||
_NudgePerspectiveReset = (KeyCode)EditorGUILayout.EnumPopup("Nudge Perspective Reset", _NudgePerspectiveReset); | |||||
_CyclePerspective = (KeyCode)EditorGUILayout.EnumPopup("Cycle Perspective", _CyclePerspective); | |||||
if (GUILayout.Button("Reset")) | |||||
{ | |||||
if (EditorUtility.DisplayDialog("Delete ProGrids editor preferences?", "Are you sure you want to delete these?, this action cannot be undone.", "Yes", "No")) | |||||
ResetPrefs(); | |||||
} | |||||
if (GUI.changed) | |||||
SetPreferences(); | |||||
} | |||||
public static bool LoadPreferences() | |||||
{ | |||||
_scaleSnapEnabled = EditorPrefs.HasKey("scaleSnapEnabled") ? EditorPrefs.GetBool("scaleSnapEnabled") : false; | |||||
_gridColorX = (EditorPrefs.HasKey("gridColorX")) ? pg_Util.ColorWithString(EditorPrefs.GetString("gridColorX")) : GRID_COLOR_X; | |||||
_gridColorY = (EditorPrefs.HasKey("gridColorY")) ? pg_Util.ColorWithString(EditorPrefs.GetString("gridColorY")) : GRID_COLOR_Y; | |||||
_gridColorZ = (EditorPrefs.HasKey("gridColorZ")) ? pg_Util.ColorWithString(EditorPrefs.GetString("gridColorZ")) : GRID_COLOR_Z; | |||||
_alphaBump = (EditorPrefs.HasKey("pg_alphaBump")) ? EditorPrefs.GetFloat("pg_alphaBump") : ALPHA_BUMP; | |||||
_snapMethod = System.Convert.ToInt32( | |||||
(EditorPrefs.HasKey(pg_Constant.UseAxisConstraints)) ? EditorPrefs.GetBool(pg_Constant.UseAxisConstraints) : USE_AXIS_CONSTRAINTS | |||||
); | |||||
_BracketIncreaseValue = EditorPrefs.HasKey(pg_Constant.BracketIncreaseValue) ? EditorPrefs.GetFloat(pg_Constant.BracketIncreaseValue) : .25f; | |||||
_GridUnits = (SnapUnit)(EditorPrefs.HasKey(pg_Constant.GridUnit) ? EditorPrefs.GetInt(pg_Constant.GridUnit) : 0); | |||||
_syncUnitySnap = EditorPrefs.GetBool(pg_Constant.SyncUnitySnap, true); | |||||
_IncreaseGridSize = EditorPrefs.HasKey("pg_Editor::IncreaseGridSize") | |||||
? (KeyCode)EditorPrefs.GetInt("pg_Editor::IncreaseGridSize") | |||||
: KeyCode.Equals; | |||||
_DecreaseGridSize = EditorPrefs.HasKey("pg_Editor::DecreaseGridSize") | |||||
? (KeyCode)EditorPrefs.GetInt("pg_Editor::DecreaseGridSize") | |||||
: KeyCode.Minus; | |||||
_NudgePerspectiveBackward = EditorPrefs.HasKey("pg_Editor::NudgePerspectiveBackward") | |||||
? (KeyCode)EditorPrefs.GetInt("pg_Editor::NudgePerspectiveBackward") | |||||
: KeyCode.LeftBracket; | |||||
_NudgePerspectiveForward = EditorPrefs.HasKey("pg_Editor::NudgePerspectiveForward") | |||||
? (KeyCode)EditorPrefs.GetInt("pg_Editor::NudgePerspectiveForward") | |||||
: KeyCode.RightBracket; | |||||
_NudgePerspectiveReset = EditorPrefs.HasKey("pg_Editor::NudgePerspectiveReset") | |||||
? (KeyCode)EditorPrefs.GetInt("pg_Editor::NudgePerspectiveReset") | |||||
: KeyCode.Alpha0; | |||||
_CyclePerspective = EditorPrefs.HasKey("pg_Editor::CyclePerspective") | |||||
? (KeyCode)EditorPrefs.GetInt("pg_Editor::CyclePerspective") | |||||
: KeyCode.Backslash; | |||||
return true; | |||||
} | |||||
public static void SetPreferences() | |||||
{ | |||||
EditorPrefs.SetBool("scaleSnapEnabled", _scaleSnapEnabled); | |||||
EditorPrefs.SetString("gridColorX", _gridColorX.ToString("f3")); | |||||
EditorPrefs.SetString("gridColorY", _gridColorY.ToString("f3")); | |||||
EditorPrefs.SetString("gridColorZ", _gridColorZ.ToString("f3")); | |||||
EditorPrefs.SetFloat("pg_alphaBump", _alphaBump); | |||||
EditorPrefs.SetBool(pg_Constant.UseAxisConstraints, System.Convert.ToBoolean(_snapMethod)); | |||||
EditorPrefs.SetFloat(pg_Constant.BracketIncreaseValue, _BracketIncreaseValue); | |||||
EditorPrefs.SetInt(pg_Constant.GridUnit, (int)_GridUnits); | |||||
EditorPrefs.SetBool(pg_Constant.SyncUnitySnap, _syncUnitySnap); | |||||
EditorPrefs.SetInt("pg_Editor::IncreaseGridSize", (int)_IncreaseGridSize); | |||||
EditorPrefs.SetInt("pg_Editor::DecreaseGridSize", (int)_DecreaseGridSize); | |||||
EditorPrefs.SetInt("pg_Editor::NudgePerspectiveBackward", (int)_NudgePerspectiveBackward); | |||||
EditorPrefs.SetInt("pg_Editor::NudgePerspectiveForward", (int)_NudgePerspectiveForward); | |||||
EditorPrefs.SetInt("pg_Editor::NudgePerspectiveReset", (int)_NudgePerspectiveReset); | |||||
EditorPrefs.SetInt("pg_Editor::CyclePerspective", (int)_CyclePerspective); | |||||
if (pg_Editor.instance != null) | |||||
{ | |||||
pg_Editor.instance.LoadPreferences(); | |||||
} | |||||
} | |||||
public static void ResetPrefs() | |||||
{ | |||||
EditorPrefs.DeleteKey("scaleSnapEnabled"); | |||||
EditorPrefs.DeleteKey("gridColorX"); | |||||
EditorPrefs.DeleteKey("gridColorY"); | |||||
EditorPrefs.DeleteKey("gridColorZ"); | |||||
EditorPrefs.DeleteKey("pg_alphaBump"); | |||||
EditorPrefs.DeleteKey(pg_Constant.UseAxisConstraints); | |||||
EditorPrefs.DeleteKey(pg_Constant.BracketIncreaseValue); | |||||
EditorPrefs.DeleteKey(pg_Constant.GridUnit); | |||||
EditorPrefs.DeleteKey("showgrid"); | |||||
EditorPrefs.DeleteKey(pg_Constant.SnapMultiplier); | |||||
EditorPrefs.DeleteKey(pg_Constant.SyncUnitySnap); | |||||
EditorPrefs.DeleteKey("pg_Editor::IncreaseGridSize"); | |||||
EditorPrefs.DeleteKey("pg_Editor::DecreaseGridSize"); | |||||
EditorPrefs.DeleteKey("pg_Editor::NudgePerspectiveBackward"); | |||||
EditorPrefs.DeleteKey("pg_Editor::NudgePerspectiveForward"); | |||||
EditorPrefs.DeleteKey("pg_Editor::NudgePerspectiveReset"); | |||||
EditorPrefs.DeleteKey("pg_Editor::CyclePerspective"); | |||||
LoadPreferences(); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 19a8719bbc0e11f46b9cd7b9debdfc12 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,48 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
namespace ProGrids | |||||
{ | |||||
/** | |||||
* A substitute for GUIContent that offers some additional functionality. | |||||
*/ | |||||
[System.Serializable] | |||||
public class pg_ToggleContent | |||||
{ | |||||
public string text_on, text_off; | |||||
public Texture2D image_on, image_off; | |||||
public string tooltip; | |||||
GUIContent gc = new GUIContent(); | |||||
public pg_ToggleContent(string t_on, string t_off, string tooltip) | |||||
{ | |||||
this.text_on = t_on; | |||||
this.text_off = t_off; | |||||
this.image_on = (Texture2D)null; | |||||
this.image_off = (Texture2D)null; | |||||
this.tooltip = tooltip; | |||||
gc.tooltip = tooltip; | |||||
} | |||||
public pg_ToggleContent(string t_on, string t_off, Texture2D i_on, Texture2D i_off, string tooltip) | |||||
{ | |||||
this.text_on = t_on; | |||||
this.text_off = t_off; | |||||
this.image_on = i_on; | |||||
this.image_off = i_off; | |||||
this.tooltip = tooltip; | |||||
gc.tooltip = tooltip; | |||||
} | |||||
public static bool ToggleButton(Rect r, pg_ToggleContent content, bool enabled, GUIStyle imageStyle, GUIStyle altStyle) | |||||
{ | |||||
content.gc.image = enabled ? content.image_on : content.image_off; | |||||
content.gc.text = content.gc.image == null ? (enabled ? content.text_on : content.text_off) : ""; | |||||
return GUI.Button(r, content.gc, content.gc.image != null ? imageStyle : altStyle); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 66b1c4a9ec825c7458f935aae34d66b1 | |||||
timeCreated: 18446744011573954816 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,10 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 923ab02b47ee8dc46887d8c0d86f3415 | |||||
folderAsset: yes | |||||
timeCreated: 1518451281 | |||||
licenseType: Store | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,10 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 4a29fc6d2c7722c45bd47ac290baf279 | |||||
folderAsset: yes | |||||
timeCreated: 1518451281 | |||||
licenseType: Store | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:0ddad8c6a7c4ad8b589099d0796acc0f605f3c0a7c2fd00c70ed5fe3bd171a2e | |||||
size 21338 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8281de412bbc46b40afdd068d9d2044f | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -2 | |||||
maxTextureSize: 64 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 64 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: 2 | |||||
textureCompression: 1 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:f235af101515205559569fdbfdf2be8e4b55f59e49ef189d6e5d23718b0c8b24 | |||||
size 21305 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 3c3493bf8d4a3e74c87521fe3146f305 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -1 | |||||
maxTextureSize: 2048 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 2048 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 1 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:caa48a80599c60790c4cdb39d6520078800546188ef045c72c7cdeed0555543f | |||||
size 3672 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: f76e5096e35bd46738f38f63f9ab22ea | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:f13f08c4d14fcc9e4279c877d3bf0c32e5328626a9218eb337660354755fbef2 | |||||
size 3727 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: e9803fa21775b4b3dacced048cb0ffdf | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:6a81d66d9f19dfe61287ced44766a19a4589775521fbd28dc3c0b30898707d0b | |||||
size 2833 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 0e7db4d5bd21647239f661f1b9310dce | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:1a938b82e74836782b1dd3b88da07fabd0c6efacf297b34443d2ecef4b92ac82 | |||||
size 4148 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 7fd5b20cf2a654b2e870f7a1fc36880c | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:b68663ea7213792bf15b8d00216af912bfeb0fd8bfe71ce656b1771f0912d76b | |||||
size 4332 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b9070affd779543919170b8284170c7f | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:4a361917662ec59ccded2cb01d7c65251a62e0ff77dd295cb61254bd4d896207 | |||||
size 3332 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 4248dedb08feb441b93fb1b4a5ceac45 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:8a6e52e1180dfdd7c2289041fc72bee7c0f2bfcf153c7c30d380619399b86248 | |||||
size 3320 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 31dd4d304c9ea41a19bdff12d41f2442 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:6cc7d307aec8d9ac0496ad9e55140fb526987e9e8c6e0b89aaf250cfd7dd50c4 | |||||
size 3962 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 14ac2b994b9eeb14ebbf81c00d406878 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:3dea4e224b618b3ff8155e59a82de5af0e80ed284b1db0b2139d294814c07c64 | |||||
size 4053 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 90c5e2cb906f2c0428a8236728c9cc70 | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:dab66f21df55de3e4b6ef9dfd746a827c15ac5f6fb3b5136770b6aa6cea4f6e3 | |||||
size 3872 |
@ -0,0 +1,76 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 25ff53b61b5edf944ab6f902ec7ea13a | |||||
timeCreated: 18446744011573954816 | |||||
TextureImporter: | |||||
fileIDToRecycleName: {} | |||||
externalObjects: {} | |||||
serializedVersion: 4 | |||||
mipmaps: | |||||
mipMapMode: 0 | |||||
enableMipMap: 0 | |||||
sRGBTexture: 0 | |||||
linearTexture: 1 | |||||
fadeOut: 0 | |||||
borderMipMap: 0 | |||||
mipMapsPreserveCoverage: 0 | |||||
alphaTestReferenceValue: 0.5 | |||||
mipMapFadeDistanceStart: 1 | |||||
mipMapFadeDistanceEnd: 3 | |||||
bumpmap: | |||||
convertToNormalMap: 0 | |||||
externalNormalMap: 0 | |||||
heightScale: 0.25 | |||||
normalMapFilter: 0 | |||||
isReadable: 0 | |||||
grayScaleToAlpha: 0 | |||||
generateCubemap: 6 | |||||
cubemapConvolution: 0 | |||||
seamlessCubemap: 0 | |||||
textureFormat: -3 | |||||
maxTextureSize: 1024 | |||||
textureSettings: | |||||
serializedVersion: 2 | |||||
filterMode: 0 | |||||
aniso: 0 | |||||
mipBias: -1 | |||||
wrapU: 1 | |||||
wrapV: 1 | |||||
wrapW: 1 | |||||
nPOTScale: 0 | |||||
lightmap: 0 | |||||
compressionQuality: 50 | |||||
spriteMode: 0 | |||||
spriteExtrude: 1 | |||||
spriteMeshType: 1 | |||||
alignment: 0 | |||||
spritePivot: {x: 0.5, y: 0.5} | |||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} | |||||
spritePixelsToUnits: 100 | |||||
alphaUsage: 1 | |||||
alphaIsTransparency: 0 | |||||
spriteTessellationDetail: -1 | |||||
textureType: 0 | |||||
textureShape: 1 | |||||
maxTextureSizeSet: 0 | |||||
compressionQualitySet: 0 | |||||
textureFormatSet: 0 | |||||
platformSettings: | |||||
- buildTarget: DefaultTexturePlatform | |||||
maxTextureSize: 1024 | |||||
resizeAlgorithm: 0 | |||||
textureFormat: -1 | |||||
textureCompression: 0 | |||||
compressionQuality: 50 | |||||
crunchedCompression: 0 | |||||
allowsAlphaSplitting: 0 | |||||
overridden: 0 | |||||
androidETC2FallbackOverride: 0 | |||||
spriteSheet: | |||||
serializedVersion: 2 | |||||
sprites: [] | |||||
outline: [] | |||||
physicsShape: [] | |||||
spritePackingTag: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |