├── .gitignore ├── Images ├── audiosource.jpg ├── home.jpg ├── inspectors.jpg ├── logo.png ├── logo.svg ├── map.jpg ├── open.jpg └── prefabs.jpg ├── OpenEd ├── Assets │ ├── Editor.meta │ ├── Editor │ │ ├── OpenEd.meta │ │ ├── OpenEd │ │ │ ├── OEWorkspaceInspector.js │ │ │ └── OEWorkspaceInspector.js.meta │ │ ├── OpenFile.meta │ │ ├── OpenFile │ │ │ ├── OFSerializedObjectInspector.js │ │ │ └── OFSerializedObjectInspector.js.meta │ │ ├── OpenGUI.meta │ │ └── OpenGUI │ │ │ ├── OGFontInspector.js │ │ │ ├── OGFontInspector.js.meta │ │ │ ├── OGMenuItems.js │ │ │ ├── OGMenuItems.js.meta │ │ │ ├── OGPageInspector.js │ │ │ ├── OGPageInspector.js.meta │ │ │ ├── OGRootInspector.js │ │ │ ├── OGRootInspector.js.meta │ │ │ ├── OGSkinInspector.js │ │ │ ├── OGSkinInspector.js.meta │ │ │ ├── OGWidgetInspector.js │ │ │ └── OGWidgetInspector.js.meta │ ├── Example.meta │ ├── Example │ │ ├── Maps.meta │ │ ├── Maps │ │ │ ├── example.map │ │ │ └── example.map.meta │ │ ├── Prefabs.meta │ │ ├── Prefabs │ │ │ ├── PrefabsDrawer.prefab │ │ │ ├── PrefabsDrawer.prefab.meta │ │ │ ├── SkydomeDrawer.prefab │ │ │ └── SkydomeDrawer.prefab.meta │ │ ├── Resources.meta │ │ ├── Resources │ │ │ ├── Audio.meta │ │ │ ├── Audio │ │ │ │ ├── lightning.ogg │ │ │ │ └── lightning.ogg.meta │ │ │ ├── Prefabs.meta │ │ │ └── Prefabs │ │ │ │ ├── NPCs.meta │ │ │ │ ├── NPCs │ │ │ │ ├── MyClass.prefab │ │ │ │ └── MyClass.prefab.meta │ │ │ │ ├── Skydomes.meta │ │ │ │ └── Skydomes │ │ │ │ ├── Skydome.prefab │ │ │ │ └── Skydome.prefab.meta │ │ ├── Scenes.meta │ │ ├── Scenes │ │ │ ├── editor.unity │ │ │ └── editor.unity.meta │ │ ├── Scripts.meta │ │ └── Scripts │ │ │ ├── MyClass.cs │ │ │ ├── MyClass.cs.meta │ │ │ ├── MyClassInspector.cs │ │ │ ├── MyClassInspector.cs.meta │ │ │ ├── SerializeMyClass.cs │ │ │ └── SerializeMyClass.cs.meta │ ├── Libraries.meta │ ├── Libraries │ │ ├── example.lib │ │ └── example.lib.meta │ ├── Plugins.meta │ └── Plugins │ │ ├── Ionic.Zip.dll │ │ ├── Ionic.Zip.dll.meta │ │ ├── JSONObject.dll │ │ ├── JSONObject.dll.meta │ │ ├── OpenEd.meta │ │ ├── OpenEd │ │ ├── Assets.meta │ │ ├── Assets │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ │ ├── audiosource.mat │ │ │ │ ├── audiosource.mat.meta │ │ │ │ ├── axis_x.mat │ │ │ │ ├── axis_x.mat.meta │ │ │ │ ├── axis_y.mat │ │ │ │ ├── axis_y.mat.meta │ │ │ │ ├── axis_z.mat │ │ │ │ ├── axis_z.mat.meta │ │ │ │ ├── cursor.mat │ │ │ │ ├── cursor.mat.meta │ │ │ │ ├── grid.mat │ │ │ │ ├── grid.mat.meta │ │ │ │ ├── highlight.mat │ │ │ │ ├── highlight.mat.meta │ │ │ │ ├── light.mat │ │ │ │ ├── light.mat.meta │ │ │ │ ├── navmesh.mat │ │ │ │ ├── navmesh.mat.meta │ │ │ │ ├── selection.mat │ │ │ │ └── selection.mat.meta │ │ │ ├── Mesh.meta │ │ │ ├── Mesh │ │ │ │ ├── gizmos.blend │ │ │ │ ├── gizmos.blend.meta │ │ │ │ ├── gizmos.blend1 │ │ │ │ └── gizmos.blend1.meta │ │ │ ├── Shaders.meta │ │ │ ├── Shaders │ │ │ │ ├── UnlitAlphaDistanceSingleColor.shader │ │ │ │ ├── UnlitAlphaDistanceSingleColor.shader.meta │ │ │ │ ├── UnlitAlphaSingleColor.shader │ │ │ │ ├── UnlitAlphaSingleColor.shader.meta │ │ │ │ ├── UnlitColoredNoZBuffer.shader │ │ │ │ └── UnlitColoredNoZBuffer.shader.meta │ │ │ ├── Textures.meta │ │ │ └── Textures │ │ │ │ ├── audiosource.png │ │ │ │ ├── audiosource.png.meta │ │ │ │ ├── colorpicker.png │ │ │ │ ├── colorpicker.png.meta │ │ │ │ ├── light.png │ │ │ │ └── light.png.meta │ │ ├── Drawers.meta │ │ ├── Drawers │ │ │ ├── OEHierarchyDrawer.js │ │ │ ├── OEHierarchyDrawer.js.meta │ │ │ ├── OEHierarchyDrawer.prefab │ │ │ ├── OEHierarchyDrawer.prefab.meta │ │ │ ├── OEPrefabsDrawer.js │ │ │ └── OEPrefabsDrawer.js.meta │ │ ├── Inspectors.meta │ │ ├── Inspectors │ │ │ ├── OEAudioSourceInspector.js │ │ │ ├── OEAudioSourceInspector.js.meta │ │ │ ├── OELightInspector.js │ │ │ ├── OELightInspector.js.meta │ │ │ ├── OEPropertiesInspector.js │ │ │ ├── OEPropertiesInspector.js.meta │ │ │ ├── OETransformInspector.js │ │ │ └── OETransformInspector.js.meta │ │ ├── Scripts.meta │ │ ├── Scripts │ │ │ ├── OECamera.js │ │ │ ├── OECamera.js.meta │ │ │ ├── OEComponentInspector.js │ │ │ ├── OEComponentInspector.js.meta │ │ │ ├── OEDrawer.js │ │ │ ├── OEDrawer.js.meta │ │ │ ├── OEFileBrowser.js │ │ │ ├── OEFileBrowser.js.meta │ │ │ ├── OEFilesystem.js │ │ │ ├── OEFilesystem.js.meta │ │ │ ├── OEGizmo.js │ │ │ ├── OEGizmo.js.meta │ │ │ ├── OEGizmoAxis.js │ │ │ ├── OEGizmoAxis.js.meta │ │ │ ├── OEInspector.js │ │ │ ├── OEInspector.js.meta │ │ │ ├── OEPicker.js │ │ │ ├── OEPicker.js.meta │ │ │ ├── OEPreviewCamera.js │ │ │ ├── OEPreviewCamera.js.meta │ │ │ ├── OEProperties.js │ │ │ ├── OEProperties.js.meta │ │ │ ├── OEReflector.js │ │ │ ├── OEReflector.js.meta │ │ │ ├── OEResourceBrowser.js │ │ │ ├── OEResourceBrowser.js.meta │ │ │ ├── OESkydome.js │ │ │ ├── OESkydome.js.meta │ │ │ ├── OEToolbar.js │ │ │ ├── OEToolbar.js.meta │ │ │ ├── OEWorkspace.js │ │ │ └── OEWorkspace.js.meta │ │ └── Windows.meta │ │ ├── OpenFile.meta │ │ ├── OpenFile │ │ ├── OFBundle.js │ │ ├── OFBundle.js.meta │ │ ├── OFBundleManager.js │ │ ├── OFBundleManager.js.meta │ │ ├── OFDeserializer.js │ │ ├── OFDeserializer.js.meta │ │ ├── OFPlanner.js │ │ ├── OFPlanner.js.meta │ │ ├── OFPlugin.js │ │ ├── OFPlugin.js.meta │ │ ├── OFReader.js │ │ ├── OFReader.js.meta │ │ ├── OFReflector.js │ │ ├── OFReflector.js.meta │ │ ├── OFSerializedObject.js │ │ ├── OFSerializedObject.js.meta │ │ ├── OFSerializer.js │ │ ├── OFSerializer.js.meta │ │ ├── OFWeb.js │ │ ├── OFWeb.js.meta │ │ ├── OFWriter.js │ │ └── OFWriter.js.meta │ │ ├── OpenGUI.meta │ │ └── OpenGUI │ │ ├── Fonts.meta │ │ ├── Fonts │ │ ├── Ubuntu.meta │ │ └── Ubuntu │ │ │ ├── Ubuntu-R.prefab │ │ │ ├── Ubuntu-R.prefab.meta │ │ │ ├── Ubuntu-R_dynamic.ttf │ │ │ ├── Ubuntu-R_dynamic.ttf.meta │ │ │ ├── Ubuntu-R_unicode.ttf │ │ │ └── Ubuntu-R_unicode.ttf.meta │ │ ├── Scripts.meta │ │ ├── Scripts │ │ ├── OGButton.js │ │ ├── OGButton.js.meta │ │ ├── OGCameraWindow.js │ │ ├── OGCameraWindow.js.meta │ │ ├── OGDrawHelper.js │ │ ├── OGDrawHelper.js.meta │ │ ├── OGDropContainer.js │ │ ├── OGDropContainer.js.meta │ │ ├── OGDropDown.js │ │ ├── OGDropDown.js.meta │ │ ├── OGFieldContainer.js │ │ ├── OGFieldContainer.js.meta │ │ ├── OGFont.js │ │ ├── OGFont.js.meta │ │ ├── OGLabel.js │ │ ├── OGLabel.js.meta │ │ ├── OGLineNode.js │ │ ├── OGLineNode.js.meta │ │ ├── OGListItem.js │ │ ├── OGListItem.js.meta │ │ ├── OGPage.js │ │ ├── OGPage.js.meta │ │ ├── OGPopUp.js │ │ ├── OGPopUp.js.meta │ │ ├── OGProgressBar.js │ │ ├── OGProgressBar.js.meta │ │ ├── OGRoot.js │ │ ├── OGRoot.js.meta │ │ ├── OGScrollView.js │ │ ├── OGScrollView.js.meta │ │ ├── OGSkin.js │ │ ├── OGSkin.js.meta │ │ ├── OGSlicedSprite.js │ │ ├── OGSlicedSprite.js.meta │ │ ├── OGSlider.js │ │ ├── OGSlider.js.meta │ │ ├── OGSprite.js │ │ ├── OGSprite.js.meta │ │ ├── OGTabs.js │ │ ├── OGTabs.js.meta │ │ ├── OGTextField.js │ │ ├── OGTextField.js.meta │ │ ├── OGTexture.js │ │ ├── OGTexture.js.meta │ │ ├── OGTickBox.js │ │ ├── OGTickBox.js.meta │ │ ├── OGTween.js │ │ ├── OGTween.js.meta │ │ ├── OGWidget.js │ │ └── OGWidget.js.meta │ │ ├── Shaders.meta │ │ ├── Shaders │ │ ├── 3DText.shader │ │ ├── 3DText.shader.meta │ │ ├── UnlitAlphaColored.shader │ │ ├── UnlitAlphaColored.shader.meta │ │ ├── UnlitClipped.shader │ │ ├── UnlitClipped.shader.meta │ │ ├── UnlitVertexColored.shader │ │ └── UnlitVertexColored.shader.meta │ │ ├── Skins.meta │ │ └── Skins │ │ ├── OGDefault.meta │ │ └── OGDefault │ │ ├── OGDefault.mat │ │ ├── OGDefault.mat.meta │ │ ├── OGDefault.png │ │ ├── OGDefault.png.meta │ │ ├── OGDefault.prefab │ │ └── OGDefault.prefab.meta └── ProjectSettings │ ├── AudioManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshLayers.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── ProjectSettings.asset │ ├── QualitySettings.asset │ ├── TagManager.asset │ └── TimeManager.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | DS_Store 3 | *.swp 4 | OpenEd/Library 5 | OpenEd/Temp 6 | -------------------------------------------------------------------------------- /Images/audiosource.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/Images/audiosource.jpg -------------------------------------------------------------------------------- /Images/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/Images/home.jpg -------------------------------------------------------------------------------- /Images/inspectors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/Images/inspectors.jpg -------------------------------------------------------------------------------- /Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/Images/logo.png -------------------------------------------------------------------------------- /Images/map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/Images/map.jpg -------------------------------------------------------------------------------- /Images/open.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/Images/open.jpg -------------------------------------------------------------------------------- /Images/prefabs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/Images/prefabs.jpg -------------------------------------------------------------------------------- /OpenEd/Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e139217d0ebfe75478ae52304017f09e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenEd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5380980c9407743eb9ef874c5fff420f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenEd/OEWorkspaceInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | @CustomEditor ( OEWorkspace ) 4 | public class OEWorkspaceInspector extends Editor { 5 | override function OnInspectorGUI () { 6 | var workspace : OEWorkspace = target as OEWorkspace; 7 | 8 | DrawDefaultInspector (); 9 | 10 | EditorGUILayout.Space (); 11 | 12 | EditorGUILayout.LabelField ( "Preferred parents", EditorStyles.boldLabel ); 13 | 14 | for ( var i : int = 0; i < workspace.preferredParents.Length; i++ ) { 15 | EditorGUILayout.BeginHorizontal (); 16 | 17 | var typeIndex : int = 0; 18 | var typeStrings : String[] = OFField.GetTypeStrings (); 19 | 20 | for ( var t : int = 0; t < typeStrings.Length; t++ ) { 21 | if ( workspace.preferredParents[i].typeName == typeStrings[t] ) { 22 | typeIndex = t; 23 | } 24 | } 25 | 26 | workspace.preferredParents[i].typeName = typeStrings [ EditorGUILayout.Popup ( typeIndex, OFField.GetTypeStrings () ) ]; 27 | workspace.preferredParents[i].parent = EditorGUILayout.ObjectField ( workspace.preferredParents[i].parent, typeof ( Transform ), true ) as Transform; 28 | 29 | GUI.backgroundColor = Color.red; 30 | if ( GUILayout.Button ( "x", GUILayout.Width ( 28 ), GUILayout.Height ( 14 ) ) ) { 31 | var tmp : List.< OEWorkspace.PreferredParent > = new List.< OEWorkspace.PreferredParent > ( workspace.preferredParents ); 32 | 33 | tmp.RemoveAt ( i ); 34 | 35 | workspace.preferredParents = tmp.ToArray (); 36 | } 37 | GUI.backgroundColor = Color.white; 38 | 39 | EditorGUILayout.EndHorizontal (); 40 | } 41 | 42 | GUI.backgroundColor = Color.green; 43 | if ( GUILayout.Button ( "+", GUILayout.Width ( 28 ), GUILayout.Height ( 14 ) ) ) { 44 | tmp = new List.< OEWorkspace.PreferredParent > ( workspace.preferredParents ); 45 | 46 | tmp.Add ( new OEWorkspace.PreferredParent () ); 47 | 48 | workspace.preferredParents = tmp.ToArray (); 49 | } 50 | GUI.backgroundColor = Color.white; 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenEd/OEWorkspaceInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59a8ebe83cc19486ea9c95e45dfb2a66 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenFile.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92ec0d5d1183e4300a0ca27f8f7010c7 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenFile/OFSerializedObjectInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | @CustomEditor ( OFSerializedObject ) 4 | public class OFSerializedObjectInspector extends Editor { 5 | private var resourceWarning : boolean = false; 6 | 7 | private function SavePrefab ( target : UnityEngine.Object ) { 8 | var selectedGameObject : GameObject; 9 | var selectedPrefabType : PrefabType; 10 | var parentGameObject : GameObject; 11 | var prefabParent : UnityEngine.Object; 12 | 13 | selectedGameObject = Selection.gameObjects[0]; 14 | selectedPrefabType = PrefabUtility.GetPrefabType(selectedGameObject); 15 | parentGameObject = selectedGameObject.transform.root.gameObject; 16 | prefabParent = PrefabUtility.GetPrefabParent(selectedGameObject); 17 | 18 | EditorUtility.SetDirty(target); 19 | 20 | if (selectedPrefabType == PrefabType.PrefabInstance) { 21 | PrefabUtility.ReplacePrefab(parentGameObject, prefabParent, 22 | ReplacePrefabOptions.ConnectToPrefab); 23 | } 24 | } 25 | 26 | override function OnInspectorGUI () { 27 | var obj : OFSerializedObject = target as OFSerializedObject; 28 | var inScene : boolean = obj.gameObject.activeInHierarchy; 29 | 30 | if ( !inScene ) { 31 | GUI.color = new Color ( 1, 1, 1, 0.5 ); 32 | } 33 | 34 | // Instance 35 | EditorGUILayout.LabelField ( "Instance", EditorStyles.boldLabel ); 36 | 37 | EditorGUILayout.BeginHorizontal (); 38 | 39 | EditorGUILayout.TextField ( "ID", obj.id ); 40 | 41 | if ( inScene ) { 42 | GUI.backgroundColor = Color.green; 43 | if ( GUILayout.Button ( "Update", GUILayout.Width ( 60 ) ) ) { 44 | obj.RenewId(); 45 | } 46 | GUI.backgroundColor = Color.white; 47 | } 48 | 49 | EditorGUILayout.EndHorizontal (); 50 | 51 | GUI.color = new Color ( 1, 1, 1, 1 ); 52 | 53 | if ( !inScene ) { 54 | obj.id = ""; 55 | 56 | } else { 57 | GUI.color = new Color ( 1, 1, 1, 0.5 ); 58 | 59 | } 60 | 61 | // Resource 62 | EditorGUILayout.Space (); 63 | EditorGUILayout.LabelField ( "Resource", EditorStyles.boldLabel ); 64 | 65 | EditorGUILayout.BeginHorizontal (); 66 | 67 | EditorGUILayout.TextField ( "Path", obj.prefabPath ); 68 | 69 | if ( !inScene ) { 70 | GUI.backgroundColor = Color.green; 71 | if ( GUILayout.Button ( "Update", GUILayout.Width ( 60 ) ) ) { 72 | var path : String = AssetDatabase.GetAssetPath ( obj.gameObject ); 73 | if ( path.Contains ( "/Resources/" ) ) { 74 | var strings : String [] = path.Split ( [ "/Resources/" ], System.StringSplitOptions.None ); 75 | path = strings [ strings.Length - 1 ]; 76 | path = path.Replace ( ".prefab", "" ); 77 | 78 | obj.prefabPath = path; 79 | 80 | resourceWarning = false; 81 | 82 | } else { 83 | resourceWarning = true; 84 | 85 | } 86 | } 87 | GUI.backgroundColor = Color.white; 88 | } 89 | 90 | EditorGUILayout.EndHorizontal (); 91 | 92 | if ( resourceWarning ) { 93 | obj.prefabPath = ""; 94 | GUI.color = Color.red; 95 | EditorGUILayout.LabelField ( "Object not in /Resources folder!", EditorStyles.boldLabel ); 96 | GUI.color = Color.white; 97 | } 98 | 99 | EditorGUILayout.Space (); 100 | 101 | GUI.color = new Color ( 1, 1, 1, 1 ); 102 | 103 | EditorGUILayout.LabelField ( "Components", EditorStyles.boldLabel ); 104 | var allComponents : Component[] = obj.gameObject.GetComponents.(); 105 | 106 | for ( var i : int = 0; i < allComponents.Length; i++ ) { 107 | if ( !allComponents[i] ) { continue; } 108 | 109 | var name : String = allComponents[i].GetType().ToString(); 110 | name = name.Replace ( "UnityEngine.", "" ); 111 | 112 | if ( allComponents[i].GetType() == OFSerializedObject ) { 113 | continue; 114 | } 115 | 116 | if ( OFSerializer.CanSerialize ( allComponents[i].GetType() ) ) { 117 | var hasField : boolean = obj.HasField ( name ); 118 | 119 | hasField = EditorGUILayout.Toggle ( name, hasField ); 120 | 121 | if ( hasField ) { 122 | obj.SetField ( name, allComponents[i] ); 123 | 124 | } else { 125 | obj.RemoveField ( name ); 126 | 127 | } 128 | 129 | } else { 130 | GUI.color = new Color ( 1, 1, 1, 0.5 ); 131 | EditorGUILayout.LabelField ( name ); 132 | GUI.color = Color.white; 133 | 134 | } 135 | 136 | } 137 | 138 | EditorGUILayout.Space (); 139 | 140 | EditorGUILayout.LabelField ( "File operations", EditorStyles.boldLabel ); 141 | 142 | EditorGUILayout.BeginHorizontal (); 143 | 144 | obj.exportPath = EditorGUILayout.TextField ( obj.exportPath ); 145 | 146 | if ( GUILayout.Button ( "Export" ) ) { 147 | OFWriter.SaveFile ( OFSerializer.Serialize ( obj ), Application.dataPath + "/" + obj.exportPath + "/" + obj.name + ".json" ); 148 | } 149 | 150 | EditorGUILayout.EndHorizontal (); 151 | 152 | if ( GUI.changed ) { 153 | SavePrefab ( target ); 154 | } 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenFile/OFSerializedObjectInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c42659d9db0a4a4c997e5ed89ed523b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3392167d8166088479bb8990a854fa4b 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGFontInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | @CustomEditor ( OGFont ) 4 | @InitializeOnLoad 5 | public class OGFontInspector extends Editor { 6 | private function SavePrefab () { 7 | var selectedGameObject : GameObject; 8 | var selectedPrefabType : PrefabType; 9 | var parentGameObject : GameObject; 10 | var prefabParent : UnityEngine.Object; 11 | 12 | // Get currently selected object in "Hierarchy" view and store 13 | // its type, parent, and the parent's prefab origin 14 | selectedGameObject = Selection.gameObjects[0]; 15 | selectedPrefabType = PrefabUtility.GetPrefabType(selectedGameObject); 16 | parentGameObject = selectedGameObject.transform.root.gameObject; 17 | prefabParent = PrefabUtility.GetPrefabParent(selectedGameObject); 18 | 19 | // Notify the script this is modifying that something changed 20 | EditorUtility.SetDirty(target); 21 | 22 | // If the selected object is an instance of a prefab 23 | if (selectedPrefabType == PrefabType.PrefabInstance) { 24 | // Replace parent's prefab origin with new parent as a prefab 25 | PrefabUtility.ReplacePrefab(parentGameObject, prefabParent, 26 | ReplacePrefabOptions.ConnectToPrefab); 27 | } 28 | } 29 | 30 | override function OnInspectorGUI () { 31 | var font : OGFont = target as OGFont; 32 | 33 | if ( !font ) { return; } 34 | 35 | font.dynamicFont = EditorGUILayout.ObjectField ( "Dynamic font", font.dynamicFont, Font, false ) as Font; 36 | font.bitmapFont = EditorGUILayout.ObjectField ( "Unicode font", font.bitmapFont, Font, false ) as Font; 37 | 38 | EditorGUILayout.Space (); 39 | 40 | /* DEBUG: Display available properties 41 | var s : SerializedObject = new SerializedObject ( font.bitmapFont ); 42 | var p : SerializedProperty = s.GetIterator(); 43 | 44 | for ( var i : int = 0; i < 40; i++ ) { 45 | p.Next(true); 46 | GUILayout.Label ( p.name + ", " + p.type ); 47 | } 48 | p.Reset();*/ 49 | 50 | 51 | GUI.backgroundColor = Color.green; 52 | if ( GUILayout.Button ( "Update", GUILayout.Height ( 30 ) ) ) { 53 | font.UpdateData (); 54 | } 55 | GUI.backgroundColor = Color.white; 56 | 57 | if ( GUI.changed ) { 58 | SavePrefab (); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGFontInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7a328af151e8472fab580dbd49f17f8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGMenuItems.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGMenuItems extends MonoBehaviour { 4 | // Helper functions 5 | private static function PlaceObject ( go : GameObject, scale : Vector3 ) { 6 | var parent : GameObject = Selection.activeGameObject; 7 | var root : OGRoot = GameObject.FindObjectOfType(OGRoot); 8 | 9 | if ( !parent && root ) { 10 | parent = root.currentPage.gameObject; 11 | } 12 | 13 | go.transform.parent = parent.transform; 14 | 15 | go.transform.localPosition = Vector3.zero; 16 | go.transform.localScale = scale; 17 | go.transform.localEulerAngles = Vector3.zero; 18 | 19 | Selection.activeGameObject = go; 20 | } 21 | 22 | // Menu functions 23 | @MenuItem ("OpenGUI/New Root") 24 | static function NewRoot () { 25 | var go : GameObject = new GameObject ( "Root", Camera, OGRoot ); 26 | } 27 | 28 | @MenuItem ("OpenGUI/New Page") 29 | static function NewPage () { 30 | var go : GameObject = new GameObject ( "Page", OGPage ); 31 | var root : OGRoot = GameObject.FindObjectOfType(OGRoot); 32 | 33 | if ( !root ) { 34 | Debug.LogWarning ( "No root in scene!" ); 35 | DestroyImmediate ( go ); 36 | } else { 37 | go.transform.parent = root.transform; 38 | go.transform.position = Vector3.one; 39 | go.transform.localScale = Vector3.one; 40 | go.transform.localEulerAngles = Vector3.zero; 41 | root.SetCurrentPage ( go.GetComponent(OGPage) ); 42 | } 43 | 44 | Selection.activeGameObject = go; 45 | } 46 | 47 | @MenuItem ("OpenGUI/Widgets/Button") 48 | static function NewButton () { 49 | var w : OGButton = new GameObject ( "btn_Button", OGButton ).GetComponent(OGButton); 50 | 51 | PlaceObject ( w.gameObject, new Vector3 ( 100, 30, 1 ) ); 52 | 53 | w.text = "Button"; 54 | w.ApplyDefaultStyles (); 55 | } 56 | 57 | @MenuItem ("OpenGUI/Widgets/DropContainer") 58 | static function NewDropContainer () { 59 | var w : OGDropContainer = new GameObject ( "drp_DropContainer", OGDropContainer ).GetComponent(OGDropContainer); 60 | 61 | PlaceObject ( w.gameObject, new Vector3 ( 100, 100, 1 ) ); 62 | 63 | w.ApplyDefaultStyles (); 64 | } 65 | 66 | @MenuItem ("OpenGUI/Widgets/DropDown") 67 | static function NewDropDown () { 68 | var w : OGDropDown = new GameObject ( "ddn_DropDown", OGDropDown ).GetComponent(OGDropDown); 69 | 70 | PlaceObject ( w.gameObject, new Vector3 ( 140, 20, 1 ) ); 71 | 72 | w.title = "Dropdown Menu"; 73 | w.ApplyDefaultStyles (); 74 | } 75 | 76 | @MenuItem ("OpenGUI/Widgets/Label") 77 | static function NewLabel () { 78 | var w : OGLabel = new GameObject ( "lbl_Label", OGLabel ).GetComponent(OGLabel); 79 | 80 | PlaceObject ( w.gameObject, new Vector3 ( 140, 20, 1 ) ); 81 | 82 | w.text = "New Label"; 83 | w.ApplyDefaultStyles (); 84 | } 85 | 86 | @MenuItem ("OpenGUI/Widgets/PopUp") 87 | static function NewPopUp () { 88 | var w : OGPopUp = new GameObject ( "pop_PopUp", OGPopUp ).GetComponent(OGPopUp); 89 | 90 | PlaceObject ( w.gameObject, new Vector3 ( 100, 20, 1 ) ); 91 | 92 | w.title = "Popup Menu"; 93 | w.ApplyDefaultStyles (); 94 | } 95 | 96 | @MenuItem ("OpenGUI/Widgets/ProgressBar") 97 | static function NewProgressBar () { 98 | var w : OGProgressBar = new GameObject ( "bar_ProgressBar", OGProgressBar ).GetComponent(OGProgressBar); 99 | 100 | PlaceObject ( w.gameObject, new Vector3 ( 200, 30, 1 ) ); 101 | 102 | w.padding = new Vector2 ( 8, 8 ); 103 | w.ApplyDefaultStyles (); 104 | } 105 | 106 | @MenuItem ("OpenGUI/Widgets/ScrollView") 107 | static function NewScrollView () { 108 | var w : OGScrollView = new GameObject ( "ScrollView", OGScrollView ).GetComponent(OGScrollView); 109 | 110 | PlaceObject ( w.gameObject, new Vector3 ( 1, 1, 1 ) ); 111 | 112 | w.size = new Vector2 ( 400, 300 ); 113 | w.ApplyDefaultStyles (); 114 | } 115 | 116 | @MenuItem ("OpenGUI/Widgets/SlicedSprite") 117 | static function NewSlicedSprite () { 118 | var w : OGSlicedSprite = new GameObject ( "img_SlicedSprite", OGSlicedSprite ).GetComponent(OGSlicedSprite); 119 | 120 | PlaceObject ( w.gameObject, new Vector3 ( 200, 200, 1 ) ); 121 | 122 | w.ApplyDefaultStyles (); 123 | } 124 | 125 | @MenuItem ("OpenGUI/Widgets/Slider") 126 | static function NewSlider () { 127 | var w : OGSlider = new GameObject ( "sld_Slider", OGSlider ).GetComponent(OGSlider); 128 | 129 | PlaceObject ( w.gameObject, new Vector3 ( 200, 20, 1 ) ); 130 | 131 | w.ApplyDefaultStyles (); 132 | } 133 | 134 | @MenuItem ("OpenGUI/Widgets/Sprite") 135 | static function NewSprite () { 136 | var w : OGSprite = new GameObject ( "img_Sprite", OGSprite ).GetComponent(OGSprite); 137 | 138 | PlaceObject ( w.gameObject, new Vector3 ( 200, 20, 1 ) ); 139 | 140 | w.ApplyDefaultStyles (); 141 | } 142 | 143 | @MenuItem ("OpenGUI/Widgets/Tabs") 144 | static function NewTabs () { 145 | var w : OGTabs = new GameObject ( "tab_Tabs", OGTabs ).GetComponent(OGTabs); 146 | 147 | PlaceObject ( w.gameObject, new Vector3 ( 200, 20, 1 ) ); 148 | 149 | w.ApplyDefaultStyles (); 150 | } 151 | 152 | @MenuItem ("OpenGUI/Widgets/TextField") 153 | static function NewTextField () { 154 | var w : OGTextField = new GameObject ( "fld_TextField", OGTextField ).GetComponent(OGTextField); 155 | 156 | PlaceObject ( w.gameObject, new Vector3 ( 200, 20, 1 ) ); 157 | 158 | w.ApplyDefaultStyles (); 159 | } 160 | 161 | @MenuItem ("OpenGUI/Widgets/Texture") 162 | static function NewTexture () { 163 | var w : OGTexture = new GameObject ( "img_Texture", OGTexture ).GetComponent(OGTexture); 164 | 165 | PlaceObject ( w.gameObject, new Vector3 ( 120, 120, 1 ) ); 166 | } 167 | 168 | @MenuItem ("OpenGUI/Widgets/TickBox") 169 | static function NewTickBox () { 170 | var w : OGTickBox = new GameObject ( "tbx_TickBox", OGTickBox ).GetComponent(OGTickBox); 171 | 172 | PlaceObject ( w.gameObject, new Vector3 ( 200, 20, 1 ) ); 173 | 174 | w.text = "Tickbox"; 175 | w.ApplyDefaultStyles (); 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGMenuItems.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54a4ca3a12124ab40b3349541c25e5a4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGPageInspector.js: -------------------------------------------------------------------------------- 1 | 2 | #pragma strict 3 | 4 | @CustomEditor ( OGPage, true ) 5 | public class OGPageInspector extends Editor { 6 | override function OnInspectorGUI () { 7 | serializedObject.Update (); 8 | 9 | var page : OGPage = target as OGPage; 10 | var root : OGRoot = OGRoot.GetInstance(); 11 | 12 | if ( !page || !root ) { return; } 13 | 14 | DrawDefaultInspector (); 15 | 16 | EditorGUILayout.Space (); 17 | 18 | GUI.backgroundColor = Color.red; 19 | 20 | if ( GUILayout.Button ( "Reset styles" ) ) { 21 | page.ResetStyles (); 22 | } 23 | 24 | GUI.backgroundColor = Color.green; 25 | 26 | 27 | if ( root.currentPage == page ) { 28 | if ( GUILayout.Button ( "Update", GUILayout.Height(30) ) ) { 29 | OGRoot.GetInstance().SetDirty(); 30 | page.UpdateStyles (); 31 | } 32 | 33 | } else { 34 | if ( GUILayout.Button ( "Set current page", GUILayout.Height(30) ) ) { 35 | OGRoot.GetInstance().SetCurrentPage ( page ); 36 | page.gameObject.SetActive ( true ); 37 | OGRoot.GetInstance().SetDirty(); 38 | } 39 | } 40 | GUI.backgroundColor = Color.white; 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGPageInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdd83d9322cc45a45b78390e9fbd3b4f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGRootInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | @CustomEditor ( OGRoot ) 4 | @InitializeOnLoad 5 | public class OGRootInspector extends Editor { 6 | private static function OGRootInspector () { 7 | OGRoot.EditorSelectWidget = function ( w : OGWidget, additive : boolean ) { 8 | if ( !w ) { 9 | Selection.activeObject = null; 10 | 11 | } else if ( additive ) { 12 | var list : List.< UnityEngine.Object > = new List.< UnityEngine.Object > ( Selection.objects ); 13 | var remove : boolean = false; 14 | 15 | for ( var i : int = 0; i < list.Count; i++ ) { 16 | if ( list[i] as GameObject == w.gameObject ) { 17 | remove = true; 18 | break; 19 | } 20 | } 21 | 22 | if ( remove ) { 23 | list.Remove ( w.gameObject ); 24 | } else { 25 | list.Add ( w.gameObject ); 26 | } 27 | 28 | Selection.objects = list.ToArray (); 29 | 30 | } else { 31 | Selection.activeObject = w.gameObject; 32 | 33 | } 34 | }; 35 | } 36 | 37 | override function OnInspectorGUI () { 38 | var root : OGRoot = target as OGRoot; 39 | 40 | if ( OGRoot.EditorSelectWidget == null ) { 41 | OGRoot.EditorSelectWidget = function ( w : OGWidget ) { 42 | Selection.activeObject = w.gameObject; 43 | }; 44 | } 45 | 46 | if ( !root ) { return; } 47 | 48 | DrawDefaultInspector (); 49 | 50 | EditorGUILayout.Space (); 51 | 52 | GUI.backgroundColor = Color.green; 53 | if ( GUILayout.Button ( "Update", GUILayout.Height ( 30 ) ) ) { 54 | root.SetDirty (); 55 | } 56 | GUI.backgroundColor = Color.white; 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGRootInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18f0d0609974bb544a3ec2a6a4c3946c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGSkinInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1aab05d021ddf9346bd64330800e1b36 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGWidgetInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | import System.Collections.Generic; 4 | 5 | @CustomEditor ( OGWidget, true ) 6 | public class OGWidgetInspector extends Editor { 7 | private function GetStyles ( widget : OGWidget ) : String[] { 8 | var tempList : List.< String > = new List.< String >(); 9 | 10 | if ( widget && widget.GetRoot() ) { 11 | for ( var style : OGStyle in widget.GetRoot().skin.styles ) { 12 | tempList.Add ( style.name ); 13 | } 14 | } 15 | 16 | return tempList.ToArray(); 17 | } 18 | 19 | private function GetStyleIndex ( widget : OGWidget, style : OGStyle ) : int { 20 | if ( widget.GetRoot() && widget.GetRoot().skin ) { 21 | for ( var i : int = 0; i < widget.GetRoot().skin.styles.Length; i++ ) { 22 | if ( widget.GetRoot().skin.styles[i].name == style.name ) { 23 | return i; 24 | } 25 | } 26 | } 27 | 28 | return 0; 29 | } 30 | 31 | override function OnInspectorGUI () { 32 | serializedObject.Update (); 33 | 34 | var widget : OGWidget = target as OGWidget; 35 | 36 | if ( !widget || !widget.GetRoot() ) { return; } 37 | 38 | // Check for hidden widgets 39 | if ( widget.hidden ) { 40 | EditorGUILayout.LabelField ( "This widget is rubbish that somehow didn't get deleted." ); 41 | 42 | // Kill! 43 | if ( GUILayout.Button ( "Fix" ) ) { 44 | DestroyImmediate ( target as GameObject ); 45 | } 46 | 47 | } else { 48 | // Default inspector 49 | DrawDefaultInspector (); 50 | 51 | // OGCameraWindow and OGTexture don't need styles 52 | if ( target.GetType() != OGTexture && target.GetType() != OGCameraWindow ) { 53 | EditorGUILayout.Space(); 54 | 55 | EditorGUILayout.LabelField ( "Style", EditorStyles.boldLabel ); 56 | 57 | for ( var styleType : OGStyleType in System.Enum.GetValues ( OGStyleType ) as OGStyleType[] ) { 58 | if ( OGSkin.IsStyleUsed ( styleType, widget.ToEnum() ) ) { 59 | // Styles 60 | var wdStyle : OGStyle = widget.styles.GetStyle ( styleType ); 61 | var wdStyleIndex : int = GetStyleIndex ( widget, wdStyle ); 62 | EditorGUILayout.BeginHorizontal(); 63 | 64 | EditorGUILayout.LabelField ( styleType.ToString() ); 65 | 66 | wdStyleIndex = EditorGUILayout.Popup ( wdStyleIndex, GetStyles ( widget ) ); 67 | widget.styles.SetStyle ( styleType, widget.GetRoot().skin.styles [ wdStyleIndex ] ); 68 | 69 | // ^ Edit 70 | if ( GUILayout.Button ( "Edit", GUILayout.Width ( 40 ) ) ) { 71 | Selection.activeObject = widget.GetRoot().skin; 72 | OGSkinInspector.SetCurrentStyle ( wdStyleIndex ); 73 | } 74 | 75 | EditorGUILayout.EndHorizontal (); 76 | } 77 | } 78 | 79 | EditorGUILayout.Space(); 80 | 81 | EditorGUILayout.BeginHorizontal(); 82 | 83 | // Get defaults 84 | if ( GUILayout.Button ( "Apply default styles" ) ) { 85 | ( target as OGWidget ).ApplyDefaultStyles(); 86 | } 87 | 88 | // ^ Edit 89 | if ( GUILayout.Button ( "Edit", GUILayout.Width ( 40 ) ) ) { 90 | Selection.activeObject = widget.GetRoot().skin; 91 | OGSkinInspector.SetDefaultsMode(); 92 | } 93 | 94 | EditorGUILayout.EndHorizontal (); 95 | } 96 | 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /OpenEd/Assets/Editor/OpenGUI/OGWidgetInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89c9f832a9b2a4a48b2090c98d5301db 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97f5da5651e067544956e3fde0d661f9 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Maps.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70a61672700bfb947912b0207e50ec49 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Maps/example.map: -------------------------------------------------------------------------------- 1 | {"Actors":[],"Audio":[],"Skydome":[{"name":"Skydome","id":"9f14bf70-0a8c-4946-a7f1-8082d8aada9a","prefabPath":"Prefabs/Skydomes/Skydome","components":[]}],"Items":[],"Lights":[{"name":"Light","id":"d7419e83-1847-489b-bc31-75f5997308cc","prefabPath":"","components":[{"eulerAngles":{"x":0,"y":0,"z":0},"position":{"x":0,"y":1.695,"z":0},"localScale":{"x":1,"y":1,"z":1},"_TYPE_":"Transform"},{"type":"Point","range":10,"color":{"r":1,"g":1,"b":1,"a":1},"intensity":1,"shadows":"None","_TYPE_":"Light"}]}],"Meta":[],"Misc":[{"name":"Richard","id":"e3809a2f-1dde-46c0-9aa2-781ebb1526a2","prefabPath":"Prefabs/NPCs/MyClass","components":[{"eulerAngles":{"x":0,"y":0,"z":0},"position":{"x":0,"y":0,"z":1.15},"localScale":{"x":1,"y":1,"z":1},"_TYPE_":"Transform"},{"myInt":20,"myFloat":1.9,"myBool":true,"myObject":"e144c531-f93a-43ef-9d7f-8ea87be52d92","myString":"Hello Jeff!","_TYPE_":"MyClass"}]},{"name":"Jeff","id":"e144c531-f93a-43ef-9d7f-8ea87be52d92","prefabPath":"Prefabs/NPCs/MyClass","components":[{"eulerAngles":{"x":0,"y":0,"z":0},"position":{"x":0,"y":0,"z":-1.269},"localScale":{"x":1,"y":1,"z":1},"_TYPE_":"Transform"},{"myInt":50,"myFloat":5.3,"myBool":true,"myObject":"e3809a2f-1dde-46c0-9aa2-781ebb1526a2","myString":"Hello Richard!","_TYPE_":"MyClass"}]}],"info":{"properties":{},"editorCamera":{"eulerAngles":{"x":20.3441,"y":320.21,"z":-4.552869E-07},"position":{"x":5.19663,"y":3.010802,"z":-6.239403},"localScale":{"x":1,"y":1,"z":1}},"editorFocus":{"x":0,"y":0,"z":0},"editorClip":0,"dontInstantiate":true}} 2 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Maps/example.map.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3f07c1a0af03f24090a660ac040e452 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e17dea38b518e3a4e88bea763cc260f8 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Prefabs/PrefabsDrawer.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Example/Prefabs/PrefabsDrawer.prefab -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Prefabs/PrefabsDrawer.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d91fd6a5ebda4221b108a11ea4f93b7 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Prefabs/SkydomeDrawer.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Example/Prefabs/SkydomeDrawer.prefab -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Prefabs/SkydomeDrawer.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2cbf90e00ae040d2ac11ed474394273 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7c44a3f0c01ce74e90bf9e3f0a04f09 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Audio.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d83e51ec8e941124b9fe9364f502761c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Audio/lightning.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Example/Resources/Audio/lightning.ogg -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Audio/lightning.ogg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab3671f04fefe19478b74eae3343acea 3 | AudioImporter: 4 | serializedVersion: 4 5 | format: 0 6 | quality: -1 7 | stream: 1 8 | 3D: 1 9 | forceToMono: 0 10 | useHardware: 0 11 | loopable: 0 12 | userData: 13 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5f7553fbd94fb14aaddb9aa454c0781 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Prefabs/NPCs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad0d19bb526beec4dad6806e0b464221 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Prefabs/NPCs/MyClass.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Example/Resources/Prefabs/NPCs/MyClass.prefab -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Prefabs/NPCs/MyClass.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 477a9e54bdfe14a4287eaf4d55b7295c 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Prefabs/Skydomes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf86ce51ce32b4342a6cc67c117e398d 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Prefabs/Skydomes/Skydome.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Example/Resources/Prefabs/Skydomes/Skydome.prefab -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Resources/Prefabs/Skydomes/Skydome.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3abcc61241660f844b19b03c6082eec1 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e473a3313ed0e6e469e169c18f1cc7ed 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scenes/editor.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a012e2f4603bd4045a24ea816af033e8 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b3019a6af581e642b7e814b61fe184a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scripts/MyClass.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class MyClass : MonoBehaviour { 5 | public bool myBool; 6 | public string myString; 7 | public int myInt; 8 | public float myFloat; 9 | public GameObject myObject; 10 | } 11 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scripts/MyClass.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d796947df4a6acc4e8808375b4e4c65e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scripts/MyClassInspector.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class MyClassInspector : OEComponentInspector { 5 | override public System.Type type { 6 | get { return typeof ( MyClass ); } 7 | } 8 | 9 | override public void Inspector () { 10 | MyClass myClass = target.GetComponent < MyClass > (); 11 | 12 | myClass.myInt = IntField ( "My int", myClass.myInt ); 13 | myClass.myFloat = Slider ( "My float", myClass.myFloat, 0f, 10f ); 14 | myClass.myString = TextField ( "My string", myClass.myString ); 15 | myClass.myBool = Toggle ( "My bool", myClass.myBool ); 16 | myClass.myObject = ObjectField ( "My object", myClass.myObject, typeof ( GameObject ), OEObjectField.Target.Scene ) as GameObject; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scripts/MyClassInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b31c9ff7510a4084ab6998dbc6fd3145 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scripts/SerializeMyClass.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class SerializeMyClass : OFPlugin { 5 | override public System.Type[] types { 6 | get { return new System.Type [] { typeof ( MyClass ) }; } 7 | } 8 | 9 | // Deserialize the class from JSON 10 | override public void Deserialize ( JSONObject input, Component output ) { 11 | MyClass myClass = output as MyClass; 12 | 13 | myClass.myInt = (int) input.GetField ( "myInt" ).n; 14 | myClass.myFloat = input.GetField ( "myFloat" ).n; 15 | myClass.myBool = input.GetField ( "myBool" ).b; 16 | myClass.myString = input.GetField ( "myString" ).str; 17 | 18 | // Assign the myObject variable only after all objects have been instantiated 19 | OFDeserializer.planner.DeferConnection ( ( OFSerializedObject so ) => { 20 | myClass.myObject = so.gameObject; 21 | }, input.GetField ( "myObject" ).str ); 22 | } 23 | 24 | // Serialize the class to JSON 25 | override public JSONObject Serialize ( Component input ) { 26 | JSONObject output = new JSONObject ( JSONObject.Type.OBJECT ); 27 | MyClass myClass = input as MyClass; 28 | 29 | output.AddField ( "myInt", myClass.myInt ); 30 | output.AddField ( "myFloat", myClass.myFloat ); 31 | output.AddField ( "myBool", myClass.myBool ); 32 | output.AddField ( "myObject", myClass.myObject.GetComponent < OFSerializedObject > ().id ); 33 | output.AddField ( "myString", myClass.myString ); 34 | 35 | return output; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /OpenEd/Assets/Example/Scripts/SerializeMyClass.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf9f0c74b67da4f48a5bf3dfd2e4850d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Libraries.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cceb0787b95346243bf80de52b803be9 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Libraries/example.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Libraries/example.lib -------------------------------------------------------------------------------- /OpenEd/Assets/Libraries/example.lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 365eb67d8b2f2194cae61ad82475cf18 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3d49a523bf134d42b5dac7800e19d4a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/Ionic.Zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/Ionic.Zip.dll -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/Ionic.Zip.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd28a334923d8c84abafc1ed45d14ba4 3 | MonoAssemblyImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | userData: 8 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/JSONObject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/JSONObject.dll -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/JSONObject.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd210f893398d4b78a2023794aa60134 3 | MonoAssemblyImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | userData: 8 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1a3dbc0ac8cf4442a6362cede3d7011 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71a6c5c3d5ad74d0491b1188a9b56644 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a6d9717a97274409a7c7172d96cd9bf 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/audiosource.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: audiosource 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 2800000, guid: e83db4c7e64744b749de4659c130027a, type: 3} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | data: 31 | first: 32 | name: _DiffuseTex 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | m_Floats: 38 | data: 39 | first: 40 | name: _LineWidth 41 | second: .100000001 42 | data: 43 | first: 44 | name: _RimPower 45 | second: 1.70777202 46 | data: 47 | first: 48 | name: _Glossiness 49 | second: .430051804 50 | data: 51 | first: 52 | name: _Outline 53 | second: .00999999978 54 | m_Colors: 55 | data: 56 | first: 57 | name: _Color 58 | second: {r: 1, g: 1, b: 1, a: .392156869} 59 | data: 60 | first: 61 | name: _LineColor 62 | second: {r: 1, g: 1, b: 1, a: 1} 63 | data: 64 | first: 65 | name: _GridColor 66 | second: {r: 1, g: 1, b: 1, a: 0} 67 | data: 68 | first: 69 | name: _DiffuseColor 70 | second: {r: 0, g: 0, b: 0, a: 1} 71 | data: 72 | first: 73 | name: _RimColor 74 | second: {r: 0, g: .709803879, b: 1, a: 1} 75 | data: 76 | first: 77 | name: _SpecularColor 78 | second: {r: .300699413, g: 1, b: 0, a: 1} 79 | data: 80 | first: 81 | name: _OutlineColor 82 | second: {r: 0, g: 1, b: 0, a: 1} 83 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/audiosource.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a29648e64f8b452f8c6dc8d44f2be11 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/axis_x.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: axis_x 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | m_Floats: {} 24 | m_Colors: 25 | data: 26 | first: 27 | name: _Color 28 | second: {r: .784313738, g: .156862751, b: 0, a: 1} 29 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/axis_x.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ad31793ec2b144c3bbbe7dfff6107be 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/axis_y.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: axis_y 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | m_Floats: {} 24 | m_Colors: 25 | data: 26 | first: 27 | name: _Color 28 | second: {r: 0, g: .784313738, b: .156862751, a: 1} 29 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/axis_y.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98e30f721d6b7439f806393ab56d5aed 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/axis_z.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: axis_z 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | m_Floats: {} 24 | m_Colors: 25 | data: 26 | first: 27 | name: _Color 28 | second: {r: 0, g: .478431374, b: 1, a: 1} 29 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/axis_z.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2d81eed7fc1c49e28f6f3e60d64a668 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/cursor.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: cursor 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | data: 31 | first: 32 | name: _DiffuseTex 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | m_Floats: 38 | data: 39 | first: 40 | name: _LineWidth 41 | second: .100000001 42 | data: 43 | first: 44 | name: _RimPower 45 | second: 1.70777202 46 | data: 47 | first: 48 | name: _Glossiness 49 | second: .430051804 50 | data: 51 | first: 52 | name: _Outline 53 | second: .00999999978 54 | m_Colors: 55 | data: 56 | first: 57 | name: _Color 58 | second: {r: 1, g: 1, b: 1, a: 1} 59 | data: 60 | first: 61 | name: _LineColor 62 | second: {r: 1, g: 1, b: 1, a: 1} 63 | data: 64 | first: 65 | name: _GridColor 66 | second: {r: 1, g: 1, b: 1, a: 0} 67 | data: 68 | first: 69 | name: _DiffuseColor 70 | second: {r: 0, g: 0, b: 0, a: 1} 71 | data: 72 | first: 73 | name: _RimColor 74 | second: {r: 0, g: .709803879, b: 1, a: 1} 75 | data: 76 | first: 77 | name: _SpecularColor 78 | second: {r: .300699413, g: 1, b: 0, a: 1} 79 | data: 80 | first: 81 | name: _OutlineColor 82 | second: {r: 0, g: 1, b: 0, a: 1} 83 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/cursor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f59966ddb6fa13240ab811615acbdc8f 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/grid.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenEd/Assets/Materials/grid.mat -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/grid.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 754b60f0423dcc0408a9a03daa89a69f 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/highlight.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: highlight 10 | m_Shader: {fileID: 4800000, guid: 8876f1ca13186044bb9de3dc92be043e, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _DiffuseTex 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Floats: 31 | data: 32 | first: 33 | name: _LineWidth 34 | second: .100000001 35 | data: 36 | first: 37 | name: _RimPower 38 | second: 1.70777202 39 | data: 40 | first: 41 | name: _Glossiness 42 | second: .430051804 43 | m_Colors: 44 | data: 45 | first: 46 | name: _Color 47 | second: {r: 1, g: 1, b: 1, a: .556862772} 48 | data: 49 | first: 50 | name: _LineColor 51 | second: {r: 1, g: 1, b: 1, a: 1} 52 | data: 53 | first: 54 | name: _GridColor 55 | second: {r: 1, g: 1, b: 1, a: 0} 56 | data: 57 | first: 58 | name: _DiffuseColor 59 | second: {r: 0, g: 0, b: 0, a: 1} 60 | data: 61 | first: 62 | name: _RimColor 63 | second: {r: 0, g: .709803879, b: 1, a: 1} 64 | data: 65 | first: 66 | name: _SpecularColor 67 | second: {r: .300699413, g: 1, b: 0, a: 1} 68 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/highlight.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc148260939374bf18c0c4a9e5ccb860 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/light.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: light 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 2800000, guid: e604256113ac14902a55baea3ae75682, type: 3} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | data: 31 | first: 32 | name: _DiffuseTex 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | m_Floats: 38 | data: 39 | first: 40 | name: _LineWidth 41 | second: .100000001 42 | data: 43 | first: 44 | name: _RimPower 45 | second: 1.70777202 46 | data: 47 | first: 48 | name: _Glossiness 49 | second: .430051804 50 | data: 51 | first: 52 | name: _Outline 53 | second: .00999999978 54 | m_Colors: 55 | data: 56 | first: 57 | name: _Color 58 | second: {r: 1, g: 1, b: 1, a: .392156869} 59 | data: 60 | first: 61 | name: _LineColor 62 | second: {r: 1, g: 1, b: 1, a: 1} 63 | data: 64 | first: 65 | name: _GridColor 66 | second: {r: 1, g: 1, b: 1, a: 0} 67 | data: 68 | first: 69 | name: _DiffuseColor 70 | second: {r: 0, g: 0, b: 0, a: 1} 71 | data: 72 | first: 73 | name: _RimColor 74 | second: {r: 0, g: .709803879, b: 1, a: 1} 75 | data: 76 | first: 77 | name: _SpecularColor 78 | second: {r: .300699413, g: 1, b: 0, a: 1} 79 | data: 80 | first: 81 | name: _OutlineColor 82 | second: {r: 0, g: 1, b: 0, a: 1} 83 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/light.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e6aaec074cac46a5a819686e7e80d77 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/navmesh.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: navmesh 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _DiffuseTex 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Floats: 31 | data: 32 | first: 33 | name: _LineWidth 34 | second: .100000001 35 | data: 36 | first: 37 | name: _RimPower 38 | second: 1.70777202 39 | data: 40 | first: 41 | name: _Glossiness 42 | second: .430051804 43 | m_Colors: 44 | data: 45 | first: 46 | name: _Color 47 | second: {r: 0, g: .478431374, b: 1, a: .196078435} 48 | data: 49 | first: 50 | name: _LineColor 51 | second: {r: 1, g: 1, b: 1, a: 1} 52 | data: 53 | first: 54 | name: _GridColor 55 | second: {r: 1, g: 1, b: 1, a: 0} 56 | data: 57 | first: 58 | name: _DiffuseColor 59 | second: {r: 0, g: 0, b: 0, a: 1} 60 | data: 61 | first: 62 | name: _RimColor 63 | second: {r: 0, g: .709803879, b: 1, a: 1} 64 | data: 65 | first: 66 | name: _SpecularColor 67 | second: {r: .300699413, g: 1, b: 0, a: 1} 68 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/navmesh.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a09f0da0c23804125befa92975f6a455 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/selection.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: selection 10 | m_Shader: {fileID: 4800000, guid: 155e0a880b13cfd46b4e140684753fd2, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | data: 31 | first: 32 | name: _DiffuseTex 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | data: 38 | first: 39 | name: _Ramp 40 | second: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | m_Floats: 45 | data: 46 | first: 47 | name: _LineWidth 48 | second: .100000001 49 | data: 50 | first: 51 | name: _RimPower 52 | second: 1.70777202 53 | data: 54 | first: 55 | name: _Glossiness 56 | second: .430051804 57 | data: 58 | first: 59 | name: _Outline 60 | second: .0500000007 61 | data: 62 | first: 63 | name: _LinesSize 64 | second: 1 65 | data: 66 | first: 67 | name: _Brightness 68 | second: 1 69 | m_Colors: 70 | data: 71 | first: 72 | name: _Color 73 | second: {r: .441176474, g: .708535373, b: 1, a: .196078435} 74 | data: 75 | first: 76 | name: _LineColor 77 | second: {r: 1, g: 1, b: 1, a: 1} 78 | data: 79 | first: 80 | name: _GridColor 81 | second: {r: 1, g: 1, b: 1, a: 0} 82 | data: 83 | first: 84 | name: _DiffuseColor 85 | second: {r: 0, g: 0, b: 0, a: 1} 86 | data: 87 | first: 88 | name: _RimColor 89 | second: {r: 0, g: .709803879, b: 1, a: 1} 90 | data: 91 | first: 92 | name: _SpecularColor 93 | second: {r: .300699413, g: 1, b: 0, a: 1} 94 | data: 95 | first: 96 | name: _OutlineColor 97 | second: {r: 1, g: 1, b: 1, a: 1} 98 | data: 99 | first: 100 | name: _LinesColor 101 | second: {r: 0, g: .478431702, b: 1, a: 1} 102 | data: 103 | first: 104 | name: _SColor 105 | second: {r: 0, g: 0, b: 0, a: 1} 106 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Materials/selection.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6254aac8b5670a4b9f65da138812c38 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e637b2efd8fc43a399ce13474e1d497 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Mesh/gizmos.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenEd/Assets/Mesh/gizmos.blend -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Mesh/gizmos.blend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2087f368afe8c4906bf80110b5cecf4c 3 | ModelImporter: 4 | serializedVersion: 16 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 100002: gizmo_move 8 | 100004: gizmo_rotate 9 | 100006: gizmo_scale 10 | 400000: //RootNode 11 | 400002: gizmo_move 12 | 400004: gizmo_rotate 13 | 400006: gizmo_scale 14 | 2300000: //RootNode 15 | 2300002: gizmo_move 16 | 2300004: gizmo_rotate 17 | 2300006: gizmo_scale 18 | 3300000: //RootNode 19 | 3300002: gizmo_move 20 | 3300004: gizmo_rotate 21 | 3300006: gizmo_scale 22 | 4300000: gizmo_move 23 | 4300002: gizmo_rotate 24 | 4300004: gizmo_scale 25 | 7400000: Default Take 26 | 9500000: //RootNode 27 | materials: 28 | importMaterials: 0 29 | materialName: 0 30 | materialSearch: 1 31 | animations: 32 | legacyGenerateAnimations: 4 33 | bakeSimulation: 0 34 | optimizeGameObjects: 0 35 | animationCompression: 1 36 | animationRotationError: .5 37 | animationPositionError: .5 38 | animationScaleError: .5 39 | animationWrapMode: 0 40 | extraExposedTransformPaths: [] 41 | clipAnimations: [] 42 | isReadable: 1 43 | meshes: 44 | lODScreenPercentages: [] 45 | globalScale: 1 46 | meshCompression: 0 47 | addColliders: 0 48 | importBlendShapes: 1 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | optimizeMeshForGPU: 1 53 | weldVertices: 1 54 | secondaryUVAngleDistortion: 8 55 | secondaryUVAreaDistortion: 15.000001 56 | secondaryUVHardAngle: 88 57 | secondaryUVPackMargin: 4 58 | tangentSpace: 59 | normalSmoothAngle: 60 60 | splitTangentsAcrossUV: 1 61 | normalImportMode: 0 62 | tangentImportMode: 1 63 | importAnimation: 1 64 | copyAvatar: 0 65 | humanDescription: 66 | human: [] 67 | skeleton: [] 68 | armTwist: .5 69 | foreArmTwist: .5 70 | upperLegTwist: .5 71 | legTwist: .5 72 | armStretch: .0500000007 73 | legStretch: .0500000007 74 | feetSpacing: 0 75 | rootMotionBoneName: 76 | lastHumanDescriptionAvatarSource: {instanceID: 0} 77 | animationType: 0 78 | additionalBone: 0 79 | userData: 80 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Mesh/gizmos.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenEd/Assets/Mesh/gizmos.blend1 -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Mesh/gizmos.blend1.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eed21a1b0ceec4ffa9133941515106c2 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b600e3e2cd25154ebfc5da712bb245b 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Shaders/UnlitAlphaDistanceSingleColor.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Alpha Distance Single Color" { 2 | Properties { 3 | _Color ( "Color", Color ) = ( 1, 1, 1, 1 ) 4 | _Distance ( "Distance", float ) = 25 5 | _Focus ( "Focus", Vector ) = ( 0, 0, 0 ) 6 | } 7 | 8 | SubShader { 9 | Lighting Off 10 | ZWrite Off 11 | ZTest Always 12 | Cull Off 13 | Blend SrcAlpha OneMinusSrcAlpha 14 | 15 | Tags { "Queue" = "Transparent" } 16 | CGPROGRAM 17 | #pragma surface surf Lambert 18 | 19 | uniform float4 _Color; 20 | uniform float _Distance; 21 | uniform float3 _Focus; 22 | 23 | struct Input { 24 | float4 color : COLOR; 25 | float3 worldPos; 26 | }; 27 | 28 | void surf ( Input IN, inout SurfaceOutput o ) { 29 | o.Albedo = _Color; 30 | o.Alpha = 1 - distance ( _Focus, IN.worldPos ) / _Distance; 31 | } 32 | ENDCG 33 | } 34 | 35 | Fallback "Diffuse" 36 | } 37 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Shaders/UnlitAlphaDistanceSingleColor.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4356bf978bb6c4ab7962506d9c997768 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Shaders/UnlitAlphaSingleColor.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Single Color" { 2 | Properties { 3 | _Color ("Color", Color) = (1,1,1,1) 4 | } 5 | 6 | Category { 7 | Lighting Off 8 | ZWrite Off 9 | Cull Off 10 | Blend SrcAlpha OneMinusSrcAlpha 11 | Tags {"Queue"="Transparent"} 12 | 13 | SubShader { 14 | Color [_Color] 15 | 16 | Pass { 17 | } 18 | } 19 | 20 | Fallback "Diffuse" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Shaders/UnlitAlphaSingleColor.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8876f1ca13186044bb9de3dc92be043e 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Shaders/UnlitColoredNoZBuffer.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Colored No Z Buffer" { 2 | Properties { 3 | _Color ("Color Tint", Color) = (1,1,1,1) 4 | _MainTex ("Base (RGB) Alpha (A)", 2D) = "white" 5 | } 6 | 7 | Category { 8 | Lighting Off 9 | Cull Off 10 | ZWrite On 11 | ZTest Always 12 | //ZWrite On // uncomment if you have problems like the sprite disappear in some rotations. 13 | //Cull back 14 | Blend SrcAlpha OneMinusSrcAlpha 15 | //AlphaTest Greater 0.001 // uncomment if you have problems like the sprites or 3d text have white quads instead of alpha pixels. 16 | Tags {Queue=Transparent} 17 | 18 | SubShader { 19 | Pass { 20 | SetTexture [_MainTex] { 21 | ConstantColor [_Color] 22 | Combine Texture * constant 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Shaders/UnlitColoredNoZBuffer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 155e0a880b13cfd46b4e140684753fd2 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f02fa7bfb6324415a8dccbfe89b34ac5 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Textures/audiosource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenEd/Assets/Textures/audiosource.png -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Textures/audiosource.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e83db4c7e64744b749de4659c130027a 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | spriteMeshType: 1 36 | alignment: 0 37 | spritePivot: {x: .5, y: .5} 38 | spritePixelsToUnits: 100 39 | alphaIsTransparency: 0 40 | textureType: -1 41 | buildTargetSettings: [] 42 | spriteSheet: 43 | sprites: [] 44 | spritePackingTag: 45 | userData: 46 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Textures/colorpicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenEd/Assets/Textures/colorpicker.png -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Textures/colorpicker.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 486f47668397f492e93b60b79b289edd 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | spriteMeshType: 1 36 | alignment: 0 37 | spritePivot: {x: .5, y: .5} 38 | spritePixelsToUnits: 100 39 | alphaIsTransparency: 0 40 | textureType: -1 41 | buildTargetSettings: [] 42 | spriteSheet: 43 | sprites: [] 44 | spritePackingTag: 45 | userData: 46 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Textures/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenEd/Assets/Textures/light.png -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Assets/Textures/light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e604256113ac14902a55baea3ae75682 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | spriteMeshType: 1 36 | alignment: 0 37 | spritePivot: {x: .5, y: .5} 38 | spritePixelsToUnits: 100 39 | alphaIsTransparency: 0 40 | textureType: -1 41 | buildTargetSettings: [] 42 | spriteSheet: 43 | sprites: [] 44 | spritePackingTag: 45 | userData: 46 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Drawers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0d1b838a327a4210bb88d2e19fe5069 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Drawers/OEHierarchyDrawer.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEHierarchyDrawer extends OEDrawer { 4 | public var scrollview : Transform; 5 | public var maxDepth : int = 1; 6 | 7 | private var yOffset : float; 8 | private var updateNames : Dictionary.< GameObject, OGListItem > = new Dictionary.< GameObject, OGListItem > (); 9 | 10 | public function Traverse ( node : Transform, depth : int ) { 11 | if ( depth <= maxDepth ) { 12 | var xOffset : float = depth * 20; 13 | 14 | for ( var i : int = 0; i < node.childCount; i++ ) { 15 | var n : String = node.GetChild ( i ).gameObject.name; 16 | var li : OGListItem = new GameObject ( n ).AddComponent.< OGListItem > (); 17 | 18 | updateNames.Add ( node.GetChild ( i ).gameObject, li ); 19 | li.ApplyDefaultStyles (); 20 | 21 | li.transform.parent = scrollview; 22 | li.transform.localScale = new Vector3 ( 220 - xOffset, 20, 1 ); 23 | li.transform.localPosition = new Vector3 ( xOffset, yOffset, -1 ); 24 | 25 | yOffset += 20; 26 | 27 | var obj : OFSerializedObject = node.GetChild(i).GetComponent.< OFSerializedObject >(); 28 | li.isTicked = OEWorkspace.GetInstance().IsSelected ( obj ); 29 | 30 | li.target = OEWorkspace.GetInstance().gameObject; 31 | 32 | if ( obj ) { 33 | li.message = "SelectObject"; 34 | li.argument = obj.id; 35 | 36 | } else { 37 | li.message = "ClearSelection"; 38 | 39 | } 40 | 41 | Traverse ( node.GetChild ( i ), depth + 1 ); 42 | } 43 | } 44 | } 45 | 46 | public function Update () { 47 | for ( var kvp : KeyValuePair.< GameObject, OGListItem > in updateNames ) { 48 | if ( kvp.Key ) { 49 | kvp.Value.text = kvp.Key.name; 50 | } 51 | } 52 | } 53 | 54 | public function Start () { 55 | var root : Transform = OEWorkspace.GetInstance().transform; 56 | 57 | Traverse ( root, 0 ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Drawers/OEHierarchyDrawer.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2bda6987d8e745ecb8da67dc9542004 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Drawers/OEHierarchyDrawer.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afebbc581e3514ef9b76152fceb05909 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Drawers/OEPrefabsDrawer.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEPrefabsDrawer extends OEDrawer { 4 | public var rootFolder : OEFolder; 5 | 6 | public var scrollview : Transform; 7 | public var foldername : OGLabel; 8 | public var placeButton : OGButton; 9 | public var parentButton : OGButton; 10 | public var objectName : OGLabel; 11 | 12 | private var currentFolder : OEFolder; 13 | private var path : String; 14 | private var selectedObject : String = ""; 15 | private var typeFilter : System.Type; 16 | 17 | public function Clear () { 18 | for ( var i : int = 0; i < scrollview.childCount; i++ ) { 19 | Destroy ( scrollview.GetChild ( i ).gameObject ); 20 | } 21 | 22 | selectedObject = ""; 23 | objectName.text = ""; 24 | placeButton.gameObject.SetActive ( false ); 25 | } 26 | 27 | public function SelectObject ( n : String ) { 28 | objectName.text = n; 29 | selectedObject = n; 30 | placeButton.gameObject.SetActive ( true ); 31 | } 32 | 33 | public function SetPicker ( callback : Function, type : System.Type, sender : String ) { 34 | if ( !currentFolder ) { 35 | Start (); 36 | } 37 | 38 | OGRoot.GetInstance().GoToPage ( "Home" ); 39 | 40 | typeFilter = type; 41 | Populate (); 42 | 43 | placeButton.func = function () { 44 | callback ( Resources.Load ( path + "/" + selectedObject ) as GameObject ); 45 | 46 | if ( !String.IsNullOrEmpty ( sender ) ) { 47 | OGRoot.GetInstance().GoToPage ( sender ); 48 | } 49 | }; 50 | } 51 | 52 | public function Populate () { 53 | Clear (); 54 | 55 | foldername.text = path; 56 | 57 | var offset : Vector2; 58 | var width : float = Screen.width - 12; 59 | var size : float = 100; 60 | var spacing : float = 10; 61 | 62 | if ( currentFolder.subfolders.Length == 0 ) { 63 | var objects : Object [] = OEFileSystem.GetResources ( path, typeof ( OFSerializedObject ) ); 64 | 65 | for ( var i : int = 0; i < objects.Length; i++ ) { 66 | var obj : OFSerializedObject = objects[i] as OFSerializedObject; 67 | 68 | if ( obj ) { 69 | var b : OGListItem = new GameObject ( obj.gameObject.name ).AddComponent.< OGListItem >(); 70 | var t : OGTexture = new GameObject ( obj.gameObject.name + "_tex" ).AddComponent.< OGTexture >(); 71 | 72 | b.transform.parent = scrollview; 73 | b.transform.localScale = new Vector3 ( size, size, -1 ); 74 | b.transform.localPosition = new Vector3 ( offset.x, offset.y, 1 ); 75 | 76 | b.target = this.gameObject; 77 | b.message = "SelectObject"; 78 | b.argument = obj.gameObject.name; 79 | 80 | t.transform.parent = scrollview; 81 | t.transform.localScale = new Vector3 ( size, size, -2 ); 82 | t.transform.localPosition = new Vector3 ( offset.x, offset.y, 0 ); 83 | 84 | offset.x += size + spacing; 85 | 86 | if ( offset.x >= width - size + spacing ) { 87 | offset.x = 0; 88 | offset.y += size + spacing; 89 | } 90 | 91 | OEWorkspace.GetInstance().previewCamera.CreatePreview ( obj.gameObject, t ); 92 | 93 | b.ApplyDefaultStyles (); 94 | } 95 | } 96 | 97 | } else { 98 | for ( i = 0; i < currentFolder.subfolders.Length; i++ ) { 99 | var l : OGListItem = new GameObject ( currentFolder.subfolders[i].name ).AddComponent.< OGListItem > (); 100 | 101 | l.transform.parent = scrollview; 102 | l.transform.localScale = new Vector3 ( Screen.width - 90, 30, 1 ); 103 | l.transform.localPosition = new Vector3 ( offset.x, offset.y, -1 ); 104 | 105 | l.text = currentFolder.subfolders[i].name; 106 | l.target = this.gameObject; 107 | l.message = "GoToChildFolder"; 108 | l.argument = l.text; 109 | 110 | offset.y += 30; 111 | 112 | l.ApplyDefaultStyles (); 113 | } 114 | 115 | } 116 | } 117 | 118 | public function GoToParentFolder () { 119 | if ( currentFolder != rootFolder ) { 120 | var strings : String[] = path.Split ( "/"[0] ); 121 | 122 | path = ""; 123 | 124 | for ( var i : int = 0; i < strings.Length - 1; i++ ) { 125 | if ( i > 0 ) { 126 | path += "/"; 127 | } 128 | 129 | path += strings[i]; 130 | } 131 | 132 | currentFolder = rootFolder.GetFolderFromPath ( path ); 133 | 134 | Populate (); 135 | } 136 | } 137 | 138 | public function GoToChildFolder ( folder : String ) { 139 | if ( !String.IsNullOrEmpty ( path ) ) { 140 | path += "/"; 141 | } 142 | 143 | path += folder; 144 | 145 | currentFolder = currentFolder.GetSubfolder ( folder ); 146 | 147 | Populate (); 148 | } 149 | 150 | public function Add () { 151 | if ( !String.IsNullOrEmpty ( selectedObject ) ) { 152 | OEWorkspace.GetInstance().AddPrefab ( path + "/" + selectedObject ); 153 | OEWorkspace.GetInstance().toolbar.Clear (); 154 | } 155 | } 156 | 157 | public function Start () { 158 | currentFolder = rootFolder; 159 | path = currentFolder.name; 160 | Populate (); 161 | objectName.text = ""; 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Drawers/OEPrefabsDrawer.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14258f57e6a84495ca57af320464cfba 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92ff36873b941419c8b3a63757edd386 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OEAudioSourceInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEAudioSourceInspector extends OEComponentInspector { 4 | private var audio : AudioSource; 5 | 6 | override function get type () : System.Type { return typeof ( AudioSource ); } 7 | 8 | override function Inspector () { 9 | if ( !audio ) { 10 | audio = target.GetComponent.< AudioSource >(); 11 | } 12 | 13 | audio.clip = AssetLinkField ( "Clip", "clip", target, typeof ( AudioClip ), "ogg" ) as AudioClip; 14 | 15 | offset.y += 20; 16 | 17 | audio.loop = Toggle ( "Loop", audio.loop ); 18 | audio.playOnAwake = Toggle ( "Play on awake", audio.playOnAwake ); 19 | audio.ignoreListenerPause = Toggle ( "Ignore pause", audio.ignoreListenerPause ); 20 | audio.ignoreListenerVolume = Toggle ( "Ignore volume", audio.ignoreListenerVolume ); 21 | 22 | offset.y += 20; 23 | 24 | audio.dopplerLevel = FloatField ( "Doppler level", audio.dopplerLevel ); 25 | audio.minDistance = FloatField ( "Min distance", audio.minDistance ); 26 | audio.maxDistance = FloatField ( "Max distance", audio.maxDistance ); 27 | audio.panLevel = FloatField ( "Pan level", audio.panLevel ); 28 | audio.spread = FloatField ( "Spread", audio.spread ); 29 | 30 | offset.y += 20; 31 | 32 | audio.rolloffMode = Popup ( "Rolloff mode", audio.rolloffMode, System.Enum.GetNames ( AudioRolloffMode ) ); 33 | 34 | offset.y += 20; 35 | 36 | audio.volume = Slider ( "Volume", audio.volume, 0, 1 ); 37 | audio.pitch = Slider ( "Pitch", audio.pitch, -3, 3 ); 38 | audio.priority = Slider ( "Priority", audio.priority, 0, 255 ); 39 | 40 | offset.y += 20; 41 | 42 | if ( audio.isPlaying ) { 43 | if ( Button ( "Stop" ) ) { 44 | audio.Stop (); 45 | } 46 | 47 | } else { 48 | if ( Button ( "Play" ) ) { 49 | audio.Play (); 50 | } 51 | 52 | } 53 | } 54 | 55 | override function DrawGL () { 56 | if ( audio ) { 57 | GL.Begin ( GL.LINES ); 58 | 59 | OEWorkspace.GetInstance().cam.materials.highlight.SetPass ( 0 ); 60 | 61 | var degRad = Mathf.PI / 180; 62 | var center : Vector3 = audio.transform.position; 63 | var radius : float = audio.maxDistance; 64 | var nextVector : Vector3; 65 | 66 | for ( var theta : float = 0; theta < ( 2 * Mathf.PI ); theta += 0.01 ) { 67 | nextVector = new Vector3 ( Mathf.Cos ( theta ) * radius + center.x, Mathf.Sin ( theta ) * radius + center.y, center.z ); 68 | GL.Vertex ( nextVector ); 69 | } 70 | 71 | GL.Vertex ( nextVector ); 72 | 73 | for ( theta = 0; theta < ( 2 * Mathf.PI ); theta += 0.01 ) { 74 | nextVector = new Vector3 ( center.x, Mathf.Sin ( theta ) * radius + center.y, Mathf.Cos ( theta ) * radius + center.z ); 75 | GL.Vertex ( nextVector ); 76 | } 77 | 78 | for ( theta = 0; theta < ( 2 * Mathf.PI ); theta += 0.01 ) { 79 | nextVector = new Vector3 ( Mathf.Sin ( theta ) * radius + center.x, center.y, Mathf.Cos ( theta ) * radius + center.z ); 80 | GL.Vertex ( nextVector ); 81 | } 82 | 83 | GL.End (); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OEAudioSourceInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59e57dd7aec774a55886748bcd08cb61 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OELightInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OELightInspector extends OEComponentInspector { 4 | override function get type () : System.Type { return typeof ( Light ); } 5 | 6 | override function Inspector () { 7 | var light : Light = target.GetComponent.< Light >(); 8 | 9 | light.type = Popup ( "Type", light.type, System.Enum.GetNames ( typeof ( LightType ) ) ); 10 | light.range = FloatField ( "Range", light.range ); 11 | light.color = ColorField ( "Color", light.color ); 12 | light.intensity = Slider ( "Intensity", light.intensity, 0, 8 ); 13 | light.shadows = Popup ( "Shadows", light.shadows, System.Enum.GetNames ( typeof ( LightShadows ) ) ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OELightInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af3cfc62ddacf4976926427f1610c17b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OEPropertiesInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEPropertiesInspector extends OEComponentInspector { 4 | override function get type () : System.Type { return typeof ( OEProperties ); } 5 | 6 | override function Inspector () { 7 | var properties : OEProperties = target.GetComponent.< OEProperties >(); 8 | 9 | Offset ( 0, 20 ); 10 | 11 | if ( properties.data.list.Count < 1 ) { 12 | properties.data.AddField ( "title", "Map Title" ); 13 | } 14 | 15 | for ( var i : int = 0; i < properties.data.list.Count; i++ ) { 16 | var obj : JSONObject = properties.data.list[i]; 17 | 18 | obj.type = Popup ( "", obj.type, System.Enum.GetNames ( JSONObject.Type ), new Rect ( 0, offset.y, 95, 16 ) ); 19 | properties.data.keys[i] = TextField ( "", properties.data.keys[i], new Rect ( 100, offset.y, 155, 16 ) ); 20 | 21 | switch ( obj.type ) { 22 | case JSONObject.Type.STRING: 23 | obj.str = TextField ( "", obj.str, new Rect ( 260, offset.y, 185, 16 ) ); 24 | break; 25 | 26 | case JSONObject.Type.NUMBER: 27 | obj.n = FloatField ( "", obj.n, new Rect ( 260, offset.y, 185, 16 ) ); 28 | break; 29 | 30 | case JSONObject.Type.BOOL: 31 | obj.b = Toggle ( "", obj.b, new Rect ( 260, offset.y, 16, 16 ) ); 32 | break; 33 | } 34 | 35 | if ( Button ( "x", new Rect ( 450, offset.y, 24, 16 ) ) ) { 36 | properties.data.list.RemoveAt ( i ); 37 | } 38 | 39 | Offset ( 0, 20 ); 40 | } 41 | 42 | if ( Button ( "+", new Rect ( 0, offset.y, 24, 16 ) ) ) { 43 | properties.data.AddField ( "newField", "" ); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OEPropertiesInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ce87842159d64c0fa31e39fef2c7081 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OETransformInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OETransformInspector extends OEComponentInspector { 4 | override function get type () : System.Type { return typeof ( Transform ); } 5 | 6 | override function Inspector () { 7 | var t : Transform = target.transform; 8 | 9 | if ( Button ( "P", new Rect ( 0, 0, 20, 16 ) ) ) { ResetPosition (); } 10 | if ( Button ( "R", new Rect ( 0, 20, 20, 16 ) ) ) { ResetRotation (); } 11 | if ( Button ( "S", new Rect ( 0, 40, 20, 16 ) ) ) { ResetScale (); } 12 | 13 | Offset ( 25, 0 ); 14 | 15 | t.localPosition = Vector3Field ( "", t.localPosition ); 16 | t.localEulerAngles = Vector3Field ( "", t.localEulerAngles ); 17 | t.localScale = Vector3Field ( "", t.localScale ); 18 | } 19 | 20 | public function ResetPosition () { 21 | if ( target ) { 22 | var t : Transform = target.transform; 23 | t.localPosition = Vector3.zero; 24 | } 25 | } 26 | 27 | public function ResetRotation () { 28 | if ( target ) { 29 | var t : Transform = target.transform; 30 | t.localEulerAngles = Vector3.zero; 31 | } 32 | } 33 | 34 | public function ResetScale () { 35 | if ( target ) { 36 | var t : Transform = target.transform; 37 | t.localScale = Vector3.one; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Inspectors/OETransformInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 844dc5b77bcea40318d7fbe79070c79f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae6480575b22d40bc97ccba714fcf557 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OECamera.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aecf9eec197604bf1a5cc9d46c6927c1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEComponentInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e0cda612a2a44b3cb23dae034fd9418 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEDrawer.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEDrawer extends MonoBehaviour { 4 | public var id : String = "NewDrawer"; 5 | public var stretch : boolean = false; 6 | } 7 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEDrawer.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e41f37d7e97224b4a9ad53ff86507e2d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEFileBrowser.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEFileBrowser extends OGPage { 4 | public enum BrowseMode { 5 | Open, 6 | Save 7 | } 8 | 9 | public var browseMode : BrowseMode; 10 | public var callback : Function; 11 | public var sender : String; 12 | public var filter : String; 13 | 14 | public var scrollview : Transform; 15 | public var openObjects : GameObject; 16 | public var saveObjects : GameObject; 17 | public var filenameInput : OGTextField; 18 | public var filepathInput : OGTextField; 19 | public var parentDirButton : OGButton; 20 | 21 | private var openPath : String; 22 | private var savePath : String; 23 | private var selectedFile : FileInfo; 24 | private var folders : DirectoryInfo[]; 25 | private var files : FileInfo[]; 26 | 27 | public function Clear () { 28 | scrollview.GetComponent.< OGScrollView > ().position = Vector2.zero; 29 | 30 | for ( var i : int = 0; i < scrollview.childCount; i++ ) { 31 | Destroy ( scrollview.GetChild ( i ).gameObject ); 32 | } 33 | } 34 | 35 | public function GoToPath () { 36 | SetPath ( filepathInput.text ); 37 | 38 | Populate (); 39 | } 40 | 41 | public function GoToParentFolder () { 42 | var parentFolder : DirectoryInfo; 43 | 44 | if ( browseMode == BrowseMode.Open ) { 45 | parentFolder = OEFileSystem.GetParentFolder ( openPath ); 46 | 47 | if ( parentFolder ) { 48 | openPath = parentFolder.FullName; 49 | } 50 | 51 | } else { 52 | parentFolder = OEFileSystem.GetParentFolder ( savePath ); 53 | 54 | if ( parentFolder ) { 55 | savePath = parentFolder.FullName; 56 | } 57 | 58 | } 59 | 60 | Populate (); 61 | } 62 | 63 | public function GoToChildFolder ( folder : String ) { 64 | AppendPath ( "/" + folder ); 65 | 66 | Populate (); 67 | } 68 | 69 | public function SelectFile ( file : String ) { 70 | if ( browseMode == BrowseMode.Save ) { 71 | filenameInput.text = file; 72 | } 73 | 74 | for ( var i : int = 0; i < files.Length; i++ ) { 75 | if ( files[i].Name == file ) { 76 | selectedFile = files[i]; 77 | return; 78 | } 79 | } 80 | } 81 | 82 | private function AddListItem ( text : String, message : String, offset : float, color : Color ) { 83 | var li : OGListItem = new GameObject ( text ).AddComponent.< OGListItem > (); 84 | 85 | li.text = text; 86 | li.target = this.gameObject; 87 | li.message = message; 88 | li.argument = text; 89 | li.ApplyDefaultStyles (); 90 | li.tint = color; 91 | 92 | li.transform.parent = scrollview; 93 | li.transform.localScale = new Vector3 ( 570, 20, 1 ); 94 | li.transform.localPosition = new Vector3 ( 0, offset, -1 ); 95 | } 96 | 97 | private function GetPath () : String { 98 | if ( browseMode == BrowseMode.Open ) { 99 | return openPath; 100 | 101 | } else { 102 | return savePath; 103 | 104 | } 105 | } 106 | 107 | private function SetPath ( path : String ) { 108 | if ( browseMode == BrowseMode.Open ) { 109 | openPath = path; 110 | 111 | } else { 112 | savePath = path; 113 | 114 | } 115 | } 116 | 117 | private function AppendPath ( append : String ) { 118 | SetPath ( GetPath() + append ); 119 | } 120 | 121 | public function Populate () { 122 | Clear (); 123 | 124 | var offset : float; 125 | folders = OEFileSystem.GetFolders ( GetPath() ); 126 | files = OEFileSystem.GetFiles ( GetPath() ); 127 | 128 | for ( var i : int = 0; i < folders.Length; i++ ) { 129 | AddListItem ( folders[i].Name, "GoToChildFolder", offset, new Color ( 0.9, 0.9, 0.9, 1 ) ); 130 | offset += 20; 131 | } 132 | 133 | for ( i = 0; i < files.Length; i++ ) { 134 | if ( !files[i].Name.Contains ( ".meta" ) && ( String.IsNullOrEmpty ( filter ) || files[i].Name.Contains ( filter ) ) ) { 135 | AddListItem ( files[i].Name, "SelectFile", offset, Color.white ); 136 | offset += 20; 137 | } 138 | } 139 | 140 | filepathInput.text = GetPath(); 141 | } 142 | 143 | public function Save () { 144 | if ( callback && !String.IsNullOrEmpty ( filenameInput.text ) ) { 145 | callback ( savePath + "/" + filenameInput.text ); 146 | OGRoot.GetInstance().GoToPage ( sender ); 147 | } 148 | } 149 | 150 | public function Open () { 151 | if ( callback && selectedFile && !String.IsNullOrEmpty ( sender ) ) { 152 | callback ( selectedFile, openPath ); 153 | OGRoot.GetInstance().GoToPage ( sender ); 154 | 155 | } else { 156 | 157 | Debug.LogError ( "OEFileBrowser | Missing callback or sender" ); 158 | } 159 | } 160 | 161 | public function Cancel () { 162 | OGRoot.GetInstance().GoToPage ( sender ); 163 | } 164 | 165 | override function ExitPage () { 166 | selectedFile = null; 167 | callback = null; 168 | sender = ""; 169 | filter = ""; 170 | files = null; 171 | folders = null; 172 | } 173 | 174 | override function StartPage () { 175 | if ( String.IsNullOrEmpty ( openPath ) ) { 176 | openPath = Application.dataPath; 177 | } 178 | 179 | if ( String.IsNullOrEmpty ( savePath ) ) { 180 | savePath = Application.dataPath; 181 | } 182 | 183 | openObjects.SetActive ( browseMode == BrowseMode.Open ); 184 | saveObjects.SetActive ( browseMode == BrowseMode.Save ); 185 | 186 | scrollview.GetComponent.< OGScrollView > ().size.y = browseMode == BrowseMode.Open ? 275 : 235; 187 | 188 | Populate (); 189 | } 190 | } 191 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEFileBrowser.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f734b6275cbff40079b25827af559153 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEFilesystem.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | import System.IO; 4 | 5 | public class OEFolder { 6 | public var name : String; 7 | public var subfolders : OEFolder[]; 8 | 9 | public function GetFolderFromPath ( path : String ) : OEFolder { 10 | var result : OEFolder = this; 11 | 12 | if ( path.Length > 1 ) { 13 | var names : String[] = path.Split ( "/"[0] ); 14 | var prev : OEFolder; 15 | 16 | for ( var i : int = 0; i < names.Length; i++ ) { 17 | if ( !result ) { 18 | result = prev; 19 | break; 20 | 21 | } else { 22 | prev = result; 23 | result = result.GetSubfolder ( names[i] ); 24 | 25 | } 26 | } 27 | } 28 | 29 | if ( !result ) { 30 | result = prev; 31 | } 32 | 33 | return result; 34 | } 35 | 36 | public function GetSubfolder ( name : String ) : OEFolder { 37 | for ( var i : int = 0; i < subfolders.Length; i++ ) { 38 | if ( name == subfolders[i].name ) { 39 | return subfolders[i]; 40 | } 41 | } 42 | 43 | if ( name == this.name ) { 44 | return this; 45 | } 46 | 47 | return null; 48 | } 49 | 50 | public function GetSubfolderNames () : String [] { 51 | var tmp : List.< String > = new List.< String > (); 52 | 53 | for ( var i : int = 0; i < subfolders.Length; i++ ) { 54 | tmp.Add ( subfolders[i].name ); 55 | } 56 | 57 | return tmp.ToArray (); 58 | } 59 | 60 | public function HasChild ( folder : OEFolder ) : boolean { 61 | for ( var i : int = 0; i < subfolders.Length; i++ ) { 62 | if ( folder == subfolders[i] ) { 63 | return true; 64 | } 65 | } 66 | 67 | return false; 68 | } 69 | } 70 | 71 | public class OEFileSystem { 72 | public static function GetFiles ( path : String ) : FileInfo [] { 73 | var info : DirectoryInfo = new DirectoryInfo ( path ); 74 | return info.GetFiles (); 75 | } 76 | 77 | public static function GetFolders ( path : String ) : DirectoryInfo [] { 78 | var info : DirectoryInfo = new DirectoryInfo ( path ); 79 | return info.GetDirectories (); 80 | } 81 | 82 | public static function GetResources ( path : String, type : System.Type ) : Object[] { 83 | return Resources.LoadAll ( path, type ); 84 | } 85 | 86 | public static function GetParentFolder ( path : String ) : DirectoryInfo { 87 | return Directory.GetParent ( path ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEFilesystem.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d7627431d8e440cdb98e8df5e544198 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEGizmo.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEGizmo extends MonoBehaviour { 4 | public var mode : OETransformMode; 5 | public var x : OEGizmoAxis; 6 | public var y : OEGizmoAxis; 7 | public var z : OEGizmoAxis; 8 | 9 | public var following : boolean = true; 10 | 11 | private var prevPos : Vector3; 12 | 13 | private function Round ( v : Vector3 ) : Vector3 { 14 | v.x = Math.Round ( v.x / 0.25, MidpointRounding.AwayFromZero ) * 0.25; 15 | v.y = Math.Round ( v.y / 0.25, MidpointRounding.AwayFromZero ) * 0.25; 16 | v.z = Math.Round ( v.z / 0.25, MidpointRounding.AwayFromZero ) * 0.25; 17 | 18 | return v; 19 | } 20 | 21 | private function ShouldRound () : boolean { 22 | return Input.GetKey ( KeyCode.LeftControl ) || Input.GetKey ( KeyCode.RightControl ) || Input.GetKey ( KeyCode.LeftCommand ) || Input.GetKey ( KeyCode.RightCommand ); 23 | } 24 | 25 | private function GetAveragePosition () : Vector3 { 26 | var result : Vector3 = Vector3.zero; 27 | 28 | if ( OEWorkspace.GetInstance().selection.Count > 0 ) { 29 | for ( var i : int = 0; i < OEWorkspace.GetInstance().selection.Count; i++ ) { 30 | var pos : Vector3 = OEWorkspace.GetInstance().selection[i].transform.position; 31 | var renderer : Renderer = OEWorkspace.GetInstance().selection[i].gameObject.GetComponentInChildren.< Renderer > (); 32 | 33 | if ( renderer ) { 34 | pos = renderer.bounds.center; 35 | } 36 | 37 | result += pos; 38 | } 39 | 40 | result /= OEWorkspace.GetInstance().selection.Count; 41 | } 42 | 43 | return result; 44 | } 45 | 46 | public function PutInCenter () { 47 | this.transform.position = GetAveragePosition (); 48 | } 49 | 50 | public function Move ( delta : Vector3 ) { 51 | this.transform.position += delta; 52 | 53 | if ( ShouldRound() ) { 54 | this.transform.position = Round ( this.transform.position ); 55 | } 56 | 57 | for ( var i : int = 0; i < OEWorkspace.GetInstance().selection.Count; i++ ) { 58 | var t : Transform = OEWorkspace.GetInstance().selection[i].transform; 59 | t.position += delta; 60 | 61 | if ( ShouldRound() ) { 62 | t.position = Round ( t.position ); 63 | } 64 | } 65 | } 66 | 67 | public function Rotate ( axis : OEGizmoAxis.Axis ) { 68 | var dx : float = -Input.GetAxis ( "Mouse X" ) * 2; 69 | var dy : float = Input.GetAxis ( "Mouse Y" ) * 2; 70 | var delta : Vector3; 71 | 72 | switch ( axis ) { 73 | case OEGizmoAxis.Axis.X: 74 | delta.x = dy; 75 | break; 76 | 77 | case OEGizmoAxis.Axis.Y: 78 | delta.y = dx; 79 | break; 80 | 81 | case OEGizmoAxis.Axis.Z: 82 | delta.z = dx; 83 | break; 84 | } 85 | 86 | for ( var i : int = 0; i < OEWorkspace.GetInstance().selection.Count; i++ ) { 87 | var t : Transform = OEWorkspace.GetInstance().selection[i].transform; 88 | t.localRotation = Quaternion.Euler ( t.localEulerAngles + delta ); 89 | 90 | if ( ShouldRound() ) { 91 | t.localEulerAngles = Round ( t.localEulerAngles ); 92 | } 93 | } 94 | } 95 | 96 | public function Scale ( delta : Vector3 ) { 97 | delta.z = -delta.z; 98 | 99 | for ( var i : int = 0; i < OEWorkspace.GetInstance().selection.Count; i++ ) { 100 | var t : Transform = OEWorkspace.GetInstance().selection[i].transform; 101 | var result = t.localScale + delta; 102 | 103 | if ( result.x > 0.1 && result.y > 0.1 && result.z > 0.1 ) { 104 | t.localScale += delta; 105 | 106 | if ( ShouldRound() ) { 107 | t.localScale = Round ( t.localScale ); 108 | } 109 | } 110 | } 111 | } 112 | 113 | public function Update () { 114 | this.transform.localScale = new Vector3 ( 0.075, 0.075, 0.075 ) * Vector3.Distance ( Camera.main.transform.position, this.transform.position ); 115 | 116 | if ( following ) { 117 | this.transform.position = GetAveragePosition (); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEGizmo.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a29f7ba62cce4f30aeb6a9f6c432f02 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEGizmoAxis.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEGizmoAxis extends MonoBehaviour { 4 | public enum Axis { 5 | X, 6 | Y, 7 | Z 8 | } 9 | 10 | public var gizmo : OEGizmo; 11 | public var axis : Axis; 12 | 13 | private var lockedPosition : Vector3; 14 | private var offset : Vector3; 15 | private var screenPoint : Vector3; 16 | private var prevPosition : Vector3; 17 | private var dragging : boolean = false; 18 | 19 | public function OnMouseDown () { 20 | dragging = true; 21 | 22 | gizmo.following = false; 23 | 24 | screenPoint = Camera.main.WorldToScreenPoint(gameObject.transform.position); 25 | lockedPosition = gameObject.transform.position; 26 | offset = gameObject.transform.position - Camera.main.ScreenToWorldPoint ( new Vector3 ( Input.mousePosition.x, Input.mousePosition.y, screenPoint.z ) ); 27 | prevPosition = this.transform.position; 28 | } 29 | 30 | public function Update () { 31 | if ( dragging ) { 32 | var curScreenPoint : Vector3 = new Vector3 ( Input.mousePosition.x, Input.mousePosition.y, screenPoint.z ); 33 | var curPosition : Vector3 = Camera.main.ScreenToWorldPoint ( curScreenPoint ) + offset; 34 | 35 | switch ( axis ) { 36 | case Axis.X: 37 | curPosition.y = lockedPosition.y; 38 | curPosition.z = lockedPosition.z; 39 | break; 40 | 41 | case Axis.Y: 42 | curPosition.x = lockedPosition.x; 43 | curPosition.z = lockedPosition.z; 44 | break; 45 | 46 | case Axis.Z: 47 | curPosition.x = lockedPosition.x; 48 | curPosition.y = lockedPosition.y; 49 | break; 50 | } 51 | 52 | switch ( gizmo.mode ) { 53 | case OETransformMode.Position: 54 | gizmo.Move ( curPosition - prevPosition ); 55 | break; 56 | 57 | case OETransformMode.Rotation: 58 | gizmo.Rotate ( axis ); 59 | break; 60 | 61 | case OETransformMode.Scale: 62 | gizmo.Scale ( curPosition - prevPosition ); 63 | break; 64 | } 65 | 66 | prevPosition = curPosition; 67 | 68 | if ( Input.GetMouseButtonUp ( 0 ) ) { 69 | dragging = false; 70 | gizmo.following = true; 71 | } 72 | } 73 | } 74 | 75 | public function OnMouseUp () { 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEGizmoAxis.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14e1c028533664422bde070aa9417067 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEInspector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEInspector extends MonoBehaviour { 4 | public var objectName : OGTextField; 5 | public var transformContainer : Transform; 6 | public var componentContainer : Transform; 7 | public var componentSwitch : OGPopUp; 8 | 9 | @HideInInspector public var selection : OFSerializedObject[]; 10 | 11 | private var inspectors : OEComponentInspector []; 12 | private var currentInspector : OEComponentInspector; 13 | private var transformInspector : OETransformInspector; 14 | 15 | public function Clear () { 16 | if ( currentInspector ) { 17 | currentInspector.Clear (); 18 | currentInspector = null; 19 | } 20 | 21 | for ( var i : int = 0; i < componentContainer.childCount; i++ ) { 22 | Destroy ( componentContainer.GetChild ( i ).gameObject ); 23 | } 24 | } 25 | 26 | public function IsComponentSupported ( name : String ) : boolean { 27 | for ( var i : int = 0; i < inspectors.Length; i++ ) { 28 | if ( inspectors[i].CheckType ( name ) ) { 29 | return true; 30 | } 31 | } 32 | 33 | return false; 34 | } 35 | 36 | public function SelectComponent ( name : String ) { 37 | OEWorkspace.GetInstance().cam.currentInspector = null; 38 | 39 | for ( var i : int = 0; i < inspectors.Length; i++ ) { 40 | if ( inspectors[i].CheckType ( name ) ) { 41 | Clear (); 42 | currentInspector = inspectors[i]; 43 | currentInspector.Init ( selection[0], componentContainer ); 44 | OEWorkspace.GetInstance().cam.currentInspector = currentInspector; 45 | } 46 | } 47 | } 48 | 49 | public function Start () { 50 | inspectors = OEReflector.GetInspectors (); 51 | 52 | for ( var i : int = 0; i < inspectors.Length; i++ ) { 53 | if ( inspectors[i].type == typeof ( Transform ) ) { 54 | transformInspector = inspectors[i] as OETransformInspector; 55 | } 56 | } 57 | } 58 | 59 | public function Update () { 60 | if ( selection.Length == 1 ) { 61 | objectName.text = objectName.text.Replace ( "\n", "" ); 62 | selection[0].gameObject.name = objectName.text; 63 | 64 | if ( currentInspector ) { 65 | currentInspector.Update (); 66 | } 67 | 68 | if ( transformInspector ) { 69 | transformInspector.Update (); 70 | } 71 | 72 | } else if ( currentInspector ) { 73 | Clear (); 74 | 75 | } 76 | } 77 | 78 | public function SetActive ( isActive : boolean ) { 79 | for ( var i : int = 0; i < this.transform.childCount; i++ ) { 80 | this.transform.GetChild ( i ).gameObject.SetActive ( isActive ); 81 | } 82 | } 83 | 84 | public function Refresh ( list : List.< OFSerializedObject > ) { 85 | Clear (); 86 | 87 | selection = list.ToArray (); 88 | 89 | if ( selection.Length == 1 ) { 90 | transformInspector.Init ( selection[0], transformContainer ); 91 | objectName.text = selection[0].gameObject.name; 92 | 93 | var tmpStrings : List.< String > = new List.< String > (); 94 | 95 | var obj : OFSerializedObject = selection[0]; 96 | 97 | for ( var f : int = 0; f < obj.fields.Length; f++ ) { 98 | if ( obj.fields[f].component && obj.fields[f].name != "Transform" && IsComponentSupported ( obj.fields[f].name ) ) { 99 | tmpStrings.Add ( obj.fields[f].name ); 100 | } 101 | } 102 | 103 | componentSwitch.options = tmpStrings.ToArray (); 104 | 105 | if ( componentSwitch.options.Length > 0 ) { 106 | componentSwitch.gameObject.SetActive ( true ); 107 | componentSwitch.selectedOption = componentSwitch.options[0]; 108 | SelectComponent ( componentSwitch.selectedOption ); 109 | 110 | } else { 111 | componentSwitch.gameObject.SetActive ( false ); 112 | 113 | } 114 | 115 | } else { 116 | componentSwitch.selectedOption = ""; 117 | 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEInspector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4b0ed2837d8c4ee1ae17aa1f76c3f58 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEPicker.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEPicker extends OGPage { 4 | public var message : OGLabel; 5 | public var callback : Function; 6 | public var type : System.Type; 7 | public var getPoint : boolean = false; 8 | @NonSerialized public var sender : String = "Home"; 9 | 10 | override function StartPage () { 11 | if ( getPoint ) { 12 | message.text = "Pick a point"; 13 | 14 | } else { 15 | message.text = "Pick an object (" + type.ToString().Replace("UnityEngine.","") + ")"; 16 | 17 | } 18 | } 19 | 20 | override function ExitPage () { 21 | type = null; 22 | callback = null; 23 | getPoint = false; 24 | sender = "Home"; 25 | } 26 | 27 | public function Update () { 28 | if ( Input.GetMouseButtonDown ( 0 ) ) { 29 | var hit : RaycastHit; 30 | var ray : Ray = Camera.main.ScreenPointToRay ( Input.mousePosition ); 31 | 32 | if ( Physics.Raycast ( ray, hit, Mathf.Infinity ) ) { 33 | var obj : Object = hit.collider.gameObject; 34 | 35 | if ( getPoint ) { 36 | callback ( hit.point ); 37 | OGRoot.GetInstance().GoToPage ( sender ); 38 | 39 | } else { 40 | if ( type == typeof ( GameObject ) || ( obj as GameObject ).GetComponent ( type ) ) { 41 | callback ( obj ); 42 | OGRoot.GetInstance().GoToPage ( sender ); 43 | 44 | } 45 | } 46 | } 47 | 48 | } else if ( Input.GetKeyDown ( KeyCode.Escape ) ) { 49 | OGRoot.GetInstance().GoToPage ( sender ); 50 | 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEPicker.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2a41e95cdbe04765badf702ed6f9138 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEPreviewCamera.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEPreviewCamera extends MonoBehaviour { 4 | private class QueueObject { 5 | public var gameObject : GameObject; 6 | public var texture : OGTexture; 7 | 8 | function QueueObject ( g : GameObject, t : OGTexture ) { 9 | gameObject = g; 10 | texture = t; 11 | } 12 | } 13 | 14 | private var queue : Queue = new Queue(); 15 | 16 | public function CreatePreview ( obj : GameObject, tex : OGTexture ) { 17 | queue.Enqueue ( new QueueObject ( obj, tex ) ); 18 | } 19 | 20 | private function SetLayerRecursively ( obj : GameObject, lay : int ) { 21 | if ( obj == null ) { return; } 22 | 23 | obj.layer = lay; 24 | 25 | for ( var i : int = 0; i < obj.transform.childCount; i++ ) { 26 | if ( obj.transform.GetChild(i) == null ) { 27 | continue; 28 | } 29 | 30 | SetLayerRecursively ( obj.transform.GetChild(i).gameObject, lay ); 31 | } 32 | } 33 | 34 | private function TakeScreenshot () { 35 | var obj : QueueObject = queue.Dequeue () as QueueObject; 36 | var go : GameObject = Instantiate ( obj.gameObject ) as GameObject; 37 | var tex : OGTexture = obj.texture; 38 | var distance : float = 2; 39 | var renderer : Renderer = go.GetComponentInChildren.< Renderer > (); 40 | 41 | SetLayerRecursively ( go, this.gameObject.layer ); 42 | go.transform.eulerAngles = this.transform.eulerAngles + new Vector3 ( 0, 180, 0 ); 43 | go.transform.position = Vector3.zero; 44 | 45 | this.transform.eulerAngles = Vector3.zero; 46 | 47 | for ( var c : Component in go.GetComponentsInChildren.< Component > () ) { 48 | var rb : Rigidbody = c as Rigidbody; 49 | var cc : CharacterController = c as CharacterController; 50 | var a : Animator = c as Animator; 51 | 52 | if ( rb ) { 53 | rb.isKinematic = true; 54 | rb.useGravity = false; 55 | 56 | } else if ( cc ) { 57 | var capsule : CapsuleCollider = go.AddComponent.< CapsuleCollider > (); 58 | 59 | capsule.center = cc.center; 60 | capsule.radius = cc.radius; 61 | capsule.height = cc.height; 62 | 63 | cc.enabled = false; 64 | 65 | } else if ( a ) { 66 | a.enabled = false; 67 | 68 | } 69 | } 70 | 71 | if ( renderer ) { 72 | var b : Bounds = renderer.bounds; 73 | 74 | if ( b.size.x > b.size.y ) { 75 | distance = b.size.x; 76 | } else { 77 | distance = b.size.y; 78 | } 79 | 80 | distance *= 1.5; 81 | 82 | this.transform.position = b.center - Vector3.forward * distance; 83 | 84 | } else { 85 | this.transform.position = -Vector3.forward * distance; 86 | 87 | } 88 | 89 | var thumb : Texture2D = new Texture2D ( 128, 128, TextureFormat.ARGB32, false ); 90 | thumb.name = "thumb_" + go.name; 91 | 92 | var rt : RenderTexture = new RenderTexture ( 128, 128, 24 ); 93 | this.camera.targetTexture = rt; 94 | 95 | this.camera.Render(); 96 | 97 | RenderTexture.active = rt; 98 | 99 | this.camera.Render(); 100 | 101 | // Read pixels 102 | thumb.ReadPixels(new Rect ( 0, 0, 128, 128 ), 0, 0); 103 | thumb.Apply (); 104 | tex.mainTexture = thumb; 105 | 106 | // Clean up 107 | this.camera.targetTexture = null; 108 | RenderTexture.active = null; // added to avoid errors 109 | DestroyImmediate ( rt ); 110 | Destroy ( go ); 111 | } 112 | 113 | public function Update () { 114 | if ( queue.Count > 0 ) { 115 | TakeScreenshot (); 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEPreviewCamera.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eba8a14523a244dfdb80cc5f6c6e4bff 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEProperties.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEProperties extends OGPage { 4 | public var data : JSONObject = new JSONObject ( JSONObject.Type.OBJECT ); 5 | public var content : Transform; 6 | 7 | private var inspector : OEPropertiesInspector; 8 | 9 | override function StartPage () { 10 | if ( !inspector ) { 11 | inspector = System.Activator.CreateInstance ( typeof ( OEPropertiesInspector ) ) as OEPropertiesInspector; 12 | } 13 | 14 | inspector.Init ( this.GetComponent.< OFSerializedObject > (), content ); 15 | inspector.width = 376; 16 | } 17 | 18 | function Update () { 19 | if ( inspector ) { 20 | inspector.Update (); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEProperties.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d6ba17d103e94b68bdc4b4539b4c168 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEReflector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEReflector { 4 | private static function CheckAssembly ( assembly : System.Reflection.Assembly ) : boolean { 5 | if ( assembly.FullName.StartsWith ( "Mono.Cecil" ) ) { 6 | return false; 7 | 8 | } else if ( assembly.FullName.StartsWith ( "UnityScript" ) ) { 9 | return false; 10 | 11 | } else if ( assembly.FullName.StartsWith ( "Boo.Lan" ) ) { 12 | return false; 13 | 14 | } else if ( assembly.FullName.StartsWith ( "System" ) ) { 15 | return false; 16 | 17 | } else if ( assembly.FullName.StartsWith ( "I18N" ) ) { 18 | return false; 19 | 20 | } else if ( assembly.FullName.StartsWith ( "UnityEngine" ) ) { 21 | return false; 22 | 23 | } else if ( assembly.FullName.StartsWith ( "UnityEditor" ) ) { 24 | return false; 25 | 26 | } else if ( assembly.FullName.StartsWith ( "mscorlib" ) ) { 27 | return false; 28 | 29 | } else { 30 | return true; 31 | 32 | } 33 | } 34 | 35 | private static function CheckType ( type : System.Type ) : boolean { 36 | if ( !type.IsClass ) { 37 | return false; 38 | 39 | } else if ( type.IsAbstract ) { 40 | return false; 41 | 42 | } else if ( !type.IsSubclassOf ( typeof ( OEComponentInspector ) ) ) { 43 | return false; 44 | 45 | } else { 46 | return true; 47 | 48 | } 49 | } 50 | 51 | public static function GetInspectors () : OEComponentInspector [] { 52 | var inspectors : List.< OEComponentInspector > = new List.< OEComponentInspector > (); 53 | 54 | for ( var assembly : System.Reflection.Assembly in AppDomain.CurrentDomain.GetAssemblies () ) { 55 | 56 | if ( !CheckAssembly ( assembly ) ) { continue; } 57 | 58 | for ( var type : System.Type in assembly.GetTypes () ) { 59 | 60 | if ( !CheckType ( type ) ) { continue; } 61 | 62 | inspectors.Add ( System.Activator.CreateInstance ( type ) as OEComponentInspector ); 63 | } 64 | } 65 | 66 | return inspectors.ToArray (); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEReflector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4ddf5860170847eaac429460827d6bf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEResourceBrowser.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34f6b3facb6d44cab97ad118cbb6119b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OESkydome.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | class OESkydome extends MonoBehaviour { 4 | public var cam : Camera; 5 | public var modifier : float = 0.025; 6 | public var target : Transform; 7 | 8 | public function Update () { 9 | this.transform.position = new Vector3 ( 0, 2000, 0 ); 10 | 11 | if ( !cam ) { 12 | cam = new GameObject ( "SkyboxCamera" ).AddComponent.< Camera > (); 13 | cam.transform.parent = this.transform; 14 | 15 | } else { 16 | cam.transform.rotation = Camera.main.transform.rotation; 17 | 18 | if ( target ) { 19 | cam.transform.localPosition = target.position * modifier; 20 | 21 | } else { 22 | cam.transform.localPosition = Vector3.zero; 23 | 24 | } 25 | 26 | cam.depth = Camera.main.depth - 1; 27 | 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OESkydome.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f9fcdb645d00b14fa561ccbd2d2736f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEToolbar.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OEToolbar extends MonoBehaviour { 4 | public var collapsed : boolean = true; 5 | public var stretched : boolean = true; 6 | public var background : Transform; 7 | public var drawerTypes : OEDrawer[]; 8 | public var drawerContainer : Transform; 9 | 10 | private var currentDrawer : String; 11 | 12 | public function Clear () { 13 | for ( var i : int = 0; i < drawerContainer.childCount; i++ ) { 14 | Destroy ( drawerContainer.GetChild ( i ).gameObject ); 15 | } 16 | 17 | currentDrawer = ""; 18 | 19 | collapsed = true; 20 | stretched = false; 21 | } 22 | 23 | public function GetDrawer ( name : String ) : OEDrawer { 24 | for ( var i : int = 0; i < drawerTypes.Length; i++ ) { 25 | if ( drawerTypes[i].id == name ) { 26 | return drawerTypes[i]; 27 | } 28 | } 29 | 30 | return null; 31 | } 32 | 33 | public function OpenDrawer ( name : String ) : OEDrawer { 34 | if ( currentDrawer != name ) { 35 | Clear (); 36 | 37 | collapsed = false; 38 | 39 | var drawer : OEDrawer = GetDrawer ( name ); 40 | 41 | if ( drawer ) { 42 | drawer = Instantiate ( drawer ) as OEDrawer; 43 | 44 | drawer.transform.parent = drawerContainer; 45 | drawer.transform.localPosition = Vector3.zero; 46 | drawer.transform.localScale = Vector3.one; 47 | drawer.transform.localEulerAngles = Vector3.zero; 48 | 49 | stretched = drawer.stretch; 50 | } 51 | 52 | currentDrawer = name; 53 | 54 | return drawer; 55 | 56 | } else { 57 | Clear (); 58 | return null; 59 | 60 | } 61 | } 62 | 63 | public function Refresh () { 64 | if ( !String.IsNullOrEmpty ( currentDrawer ) ) { 65 | var n : String = currentDrawer; 66 | 67 | currentDrawer = ""; 68 | 69 | OpenDrawer ( n ); 70 | } 71 | } 72 | 73 | public function Update () { 74 | if ( collapsed ) { 75 | background.GetComponent.< OGSlicedSprite > ().stretch.width = ScreenSize.None; 76 | background.localScale = new Vector3 ( 60, background.transform.localScale.y, 1 ); 77 | drawerContainer.gameObject.SetActive ( false ); 78 | 79 | } else { 80 | if ( stretched ) { 81 | background.GetComponent.< OGSlicedSprite > ().stretch.width = ScreenSize.ScreenWidth; 82 | background.GetComponent.< OGSlicedSprite > ().stretch.widthOffset = -10; 83 | 84 | } else { 85 | background.GetComponent.< OGSlicedSprite > ().stretch.width = ScreenSize.None; 86 | 87 | } 88 | 89 | background.localScale = new Vector3 ( 300, background.transform.localScale.y, 1 ); 90 | drawerContainer.gameObject.SetActive ( true ); 91 | 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEToolbar.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bee15de95a4e341d1bb3e43102436179 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Scripts/OEWorkspace.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5354721905c7740e7aababc14eb8e338 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenEd/Windows.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d81d89d888ad948ddbc5365cbb783912 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e7c2f04654834172a95639b846ed141 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFBundle.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OFBundle { 4 | public class Folder { 5 | public var name : String; 6 | public var path : String; 7 | public var subfolders : Folder [] = new Folder [0]; 8 | public var textures : Texture2D [] = new Texture2D [0]; 9 | public var audioClips : AudioClip [] = new AudioClip [0]; 10 | 11 | public function GetFolder ( n : String ) : Folder { 12 | for ( var i : int = 0; i < subfolders.Length; i++ ) { 13 | if ( subfolders[i].name == n ) { 14 | return subfolders[i]; 15 | } 16 | } 17 | 18 | return null; 19 | } 20 | 21 | public function AddTexture ( texture : Texture2D ) { 22 | var tmp : List.< Texture2D > = new List.< Texture2D > ( textures ); 23 | 24 | tmp.Add ( texture ); 25 | 26 | textures = tmp.ToArray (); 27 | } 28 | 29 | public function AddAudio ( audio : AudioClip ) { 30 | var tmp : List.< AudioClip > = new List.< AudioClip > ( audioClips ); 31 | 32 | tmp.Add ( audio ); 33 | 34 | audioClips = tmp.ToArray (); 35 | } 36 | } 37 | 38 | public var name : String; 39 | public var root : Folder; 40 | 41 | public function GetParent ( child : Folder ) : Folder { 42 | return GetFolder ( child.path.Replace ( "/" + child.name, "" ) ); 43 | } 44 | 45 | public function GetFolder ( path : String ) : Folder { 46 | var strings : String[] = path.Split ( "/"[0] ); 47 | var currentFolder : Folder = root; 48 | 49 | for ( var dirName : String in strings ) { 50 | var nextFolder : Folder = currentFolder.GetFolder ( dirName ); 51 | 52 | if ( nextFolder ) { 53 | currentFolder = nextFolder; 54 | } 55 | } 56 | 57 | return currentFolder; 58 | } 59 | 60 | public function GetFolders ( path : String ) : Folder [] { 61 | var folder : Folder = GetFolder ( path ); 62 | 63 | if ( folder ) { 64 | return folder.subfolders; 65 | 66 | } else { 67 | return null; 68 | 69 | } 70 | } 71 | 72 | public function GetObject ( path : String, type : System.Type ) : Object { 73 | if ( type == typeof ( Texture2D ) ) { 74 | return GetTexture ( path ); 75 | 76 | } else if ( type == typeof ( AudioClip ) ) { 77 | return GetAudioClip ( path ); 78 | 79 | } else { 80 | return null; 81 | 82 | } 83 | } 84 | 85 | public function GetObjects ( path : String, type : System.Type ) : Object [] { 86 | if ( type == typeof ( Texture2D ) ) { 87 | return GetTextures ( path ); 88 | 89 | } else if ( type == typeof ( AudioClip ) ) { 90 | return GetAudioClips ( path ); 91 | 92 | } else { 93 | return null; 94 | 95 | } 96 | } 97 | 98 | public function GetTextures ( path : String ) : Texture2D [] { 99 | var folder : Folder = GetFolder ( path ); 100 | 101 | if ( folder ) { 102 | return folder.textures; 103 | 104 | } else { 105 | return null; 106 | 107 | } 108 | } 109 | 110 | public function GetTexture ( path : String ) : Texture2D { 111 | var folder : Folder = GetFolder ( path ); 112 | 113 | if ( folder ) { 114 | for ( var i : int = 0; i < folder.textures.Length; i++ ) { 115 | if ( folder.textures[i].name == name ) { 116 | return folder.textures[i]; 117 | } 118 | } 119 | 120 | return null; 121 | 122 | } else { 123 | return null; 124 | 125 | } 126 | } 127 | 128 | public function GetAudioClips ( path : String ) : AudioClip [] { 129 | var folder : Folder = GetFolder ( path ); 130 | 131 | if ( folder ) { 132 | return folder.audioClips; 133 | 134 | } else { 135 | return null; 136 | 137 | } 138 | } 139 | public function GetAudioClip ( path : String ) : AudioClip { 140 | var folder : Folder = GetFolder ( path ); 141 | var audioName : String = OFBundleManager.GetName ( path ); 142 | 143 | if ( folder ) { 144 | for ( var i : int = 0; i < folder.audioClips.Length; i++ ) { 145 | if ( folder.audioClips[i].name == audioName ) { 146 | return folder.audioClips[i]; 147 | } 148 | } 149 | 150 | return null; 151 | 152 | } else { 153 | return null; 154 | 155 | } 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFBundle.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84a445507729fe44e939e0744770733a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFBundleManager.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | import System.Text; 4 | import System.IO; 5 | import Ionic.Zip; 6 | 7 | public class OFBundleManager extends MonoBehaviour { 8 | public var bundleFolder : String = "Libraries"; 9 | public var bundleExtension : String = "lib"; 10 | public var loadOnAwake : boolean = true; 11 | public var loadedBundles : List.< OFBundle > = new List.< OFBundle > (); 12 | 13 | public static var instance : OFBundleManager; 14 | 15 | public function Awake () { 16 | if ( instance != this ) { 17 | instance = this; 18 | 19 | if ( loadOnAwake ) { 20 | LoadAllBundles (); 21 | } 22 | } 23 | } 24 | 25 | public static function GetName ( path : String ) : String { 26 | var strings : String [] = path.Replace ( "\\", "/" ).Split ( "/"[0] ); 27 | 28 | return strings [ strings.length - 1 ]; 29 | } 30 | 31 | private function PopulateFolder ( folder : OFBundle.Folder ) : void { 32 | for ( var texPath : String in Directory.GetFiles ( folder.path, "*.png" ) ) { 33 | texPath = texPath.Replace ( "\\", "/" ); 34 | 35 | StartCoroutine ( function () : IEnumerator { 36 | var www : WWW = new WWW ( "file:///" + texPath ); 37 | yield www; 38 | 39 | var newTex : Texture2D = www.texture; 40 | newTex.name = GetName ( texPath ); 41 | 42 | folder.AddTexture ( newTex ); 43 | } () ); 44 | } 45 | 46 | for ( var audioPath : String in Directory.GetFiles ( folder.path, "*.ogg" ) ) { 47 | audioPath = audioPath.Replace ( "\\", "/" ); 48 | 49 | StartCoroutine ( function () : IEnumerator { 50 | var www : WWW = new WWW ( "file:///" + audioPath ); 51 | yield www; 52 | 53 | var newAudio : AudioClip = www.audioClip; 54 | newAudio.name = GetName ( audioPath ); 55 | 56 | folder.AddAudio ( newAudio ); 57 | } () ); 58 | } 59 | 60 | var directories : String [] = Directory.GetDirectories ( folder.path ); 61 | 62 | folder.subfolders = new OFBundle.Folder [ directories.Length ]; 63 | 64 | for ( var i : int = 0; i < directories.Length; i++ ) { 65 | var newFolder : OFBundle.Folder = new OFBundle.Folder (); 66 | newFolder.name = GetName ( directories[i] ); 67 | newFolder.path = folder.path + "/" + newFolder.name; 68 | 69 | PopulateFolder ( newFolder ); 70 | 71 | folder.subfolders[i] = newFolder; 72 | } 73 | } 74 | 75 | public function GetBundle ( name : String ) { 76 | for ( var i : int = 0; i < loadedBundles.Count; i++ ) { 77 | if ( loadedBundles[i].name == name ) { 78 | return loadedBundles[i]; 79 | } 80 | } 81 | 82 | return null; 83 | } 84 | 85 | public function GetBundleStrings () : String [] { 86 | var strings : String[] = new String [ loadedBundles.Count ]; 87 | 88 | for ( var i : int = 0; i < loadedBundles.Count; i++ ) { 89 | strings[i] = loadedBundles[i].name; 90 | } 91 | 92 | return strings; 93 | } 94 | 95 | public function LoadAllBundles () { 96 | if ( !File.Exists ( Application.dataPath + "/" + bundleFolder ) ) { 97 | Directory.CreateDirectory ( Application.dataPath + "/" + bundleFolder ); 98 | } 99 | 100 | for ( var dirPath : String in System.IO.Directory.GetDirectories ( Application.dataPath + "/" + bundleFolder ) ) { 101 | LoadBundle ( GetName ( dirPath ), false ); 102 | } 103 | 104 | for ( var zipPath : String in System.IO.Directory.GetFiles ( Application.dataPath + "/" + bundleFolder ) ) { 105 | if ( zipPath.Contains ( "." + bundleExtension ) ) { 106 | LoadBundle ( GetName ( zipPath ), true ); 107 | } 108 | } 109 | } 110 | 111 | public function LoadBundle ( name : String, compressed : boolean ) { 112 | var path : String; 113 | 114 | if ( compressed ) { 115 | path = Application.temporaryCachePath + "/OpenFile/Bundles/" + bundleFolder + "/" + name.Split ( "."[0] )[0]; 116 | 117 | var zip : ZipFile = ZipFile.Read ( Application.dataPath + "/" + bundleFolder + "/" + name ); 118 | 119 | name = name.Split ( "."[0] )[0]; 120 | 121 | zip.Dispose (); 122 | 123 | for ( var e : ZipEntry in zip ) { 124 | e.Extract ( path, ExtractExistingFileAction.OverwriteSilently ); 125 | } 126 | 127 | 128 | } else { 129 | path = Application.dataPath + "/" + bundleFolder + "/" + name; 130 | 131 | } 132 | 133 | var newBundle : OFBundle = new OFBundle (); 134 | 135 | newBundle.name = name; 136 | newBundle.root = new OFBundle.Folder (); 137 | newBundle.root.path = path; 138 | 139 | PopulateFolder ( newBundle.root ); 140 | 141 | loadedBundles.Add ( newBundle ); 142 | } 143 | 144 | public function UnloadBundle ( name : String ) { 145 | for ( var i : int = loadedBundles.Count - 1; i >= 0; i-- ) { 146 | if ( loadedBundles[i].name == name ) { 147 | loadedBundles.RemoveAt ( i ); 148 | } 149 | } 150 | } 151 | 152 | public function UnloadAll () { 153 | loadedBundles.Clear (); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFBundleManager.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f66c63ef75204fb09178351cca6a014 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFDeserializer.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b66b76c2147cb449180d0c131ff69fa1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFPlanner.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OFPlanner extends MonoBehaviour { 4 | public class Connection { 5 | public var callback : Action.< OFSerializedObject >; 6 | public var callbackWithIndex : Action.< OFSerializedObject, int >; 7 | public var callbackWithIndices : Action.< OFSerializedObject, int[] >; 8 | public var id : String; 9 | public var index : int = -1; 10 | public var indices : int []; 11 | 12 | function Connection ( callback : Action.< OFSerializedObject >, id : String ) { 13 | this.callback = callback; 14 | this.id = id; 15 | } 16 | 17 | function Connection ( callback : Action.< OFSerializedObject, int >, id : String, index : int ) { 18 | this.callbackWithIndex = callback; 19 | this.id = id; 20 | this.index = index; 21 | } 22 | 23 | function Connection ( callback : Action.< OFSerializedObject, int [] >, id : String, indices : int [] ) { 24 | this.callbackWithIndices = callback; 25 | this.id = id; 26 | this.indices = indices; 27 | } 28 | } 29 | 30 | private var allConnections : List.< Connection > = new List.< Connection > (); 31 | private var spawnedObjects : List.< OFSerializedObject > = new List.< OFSerializedObject > (); 32 | 33 | public function AddObject ( so : OFSerializedObject ) { 34 | spawnedObjects.Add ( so ); 35 | } 36 | 37 | public function DeferConnection ( callback : Action.< OFSerializedObject >, id : String ) { 38 | allConnections.Add ( new Connection ( callback, id ) ); 39 | } 40 | 41 | public function DeferConnection ( callback : Action.< OFSerializedObject, int >, id : String, index : int ) { 42 | allConnections.Add ( new Connection ( callback, id, index ) ); 43 | } 44 | 45 | public function DeferConnection ( callback : Action.< OFSerializedObject, int [] >, id : String, indices : int [] ) { 46 | allConnections.Add ( new Connection ( callback, id, indices ) ); 47 | } 48 | 49 | public function FindObject ( id : String ) : OFSerializedObject { 50 | for ( var so : OFSerializedObject in spawnedObjects ) { 51 | if ( so.id == id ) { 52 | return so; 53 | } 54 | } 55 | 56 | return null; 57 | } 58 | 59 | private function MakeConnections () : IEnumerator { 60 | yield WaitForEndOfFrame (); 61 | 62 | for ( var c : Connection in allConnections ) { 63 | var so : OFSerializedObject = FindObject ( c.id ); 64 | 65 | if ( so ) { 66 | if ( c.callbackWithIndex ) { 67 | c.callbackWithIndex ( so, c.index ); 68 | 69 | } else if ( c.callbackWithIndices ) { 70 | c.callbackWithIndices ( so, c.indices ); 71 | 72 | } else { 73 | c.callback ( so ); 74 | 75 | } 76 | } 77 | } 78 | 79 | yield WaitForEndOfFrame (); 80 | 81 | Destroy ( gameObject ); 82 | } 83 | 84 | public function ConnectAll () { 85 | StartCoroutine ( MakeConnections () ); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFPlanner.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f75bdb2a432a8564d89da3735584b1d5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFPlugin.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OFPlugin { 4 | public function get types () : System.Type [] { return new System.Type[0]; } 5 | 6 | public function Serialize ( input : Component ) : JSONObject {} 7 | public function Deserialize ( input : JSONObject, output : Component ) {} 8 | 9 | public function CheckType ( type : System.Type ) : boolean { 10 | for ( var i : int = 0; i < types.Length; i++ ) { 11 | if ( type == types[i] ) { 12 | return true; 13 | } 14 | } 15 | 16 | return false; 17 | } 18 | 19 | public function CheckType ( typeString : String ) : boolean { 20 | for ( var i : int = 0; i < types.Length; i++ ) { 21 | if ( typeString == types[i].ToString () ) { 22 | return true; 23 | } 24 | } 25 | 26 | return false; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFPlugin.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85e4a468cfbc54b8687aeec22711458e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFReader.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | import System.IO; 4 | 5 | public class OFReader { 6 | public static function LoadFile ( path : String ) : JSONObject { 7 | path = path.Replace ( "\\", "/" ).Replace ( Application.dataPath, "" ); 8 | 9 | #if UNITY_WEBPLAYER && !UNITY_EDITOR 10 | return OFWeb.Get ( path ); 11 | #else 12 | if ( !File.Exists ( Application.dataPath + path ) ) { 13 | Debug.LogError ( "OFReader | No such file '" + Application.dataPath + path + "'" ); 14 | return null; 15 | } 16 | 17 | var sr : StreamReader = new File.OpenText ( Application.dataPath + path ); 18 | var input : String = ""; 19 | var line : String = ""; 20 | 21 | line = sr.ReadLine(); 22 | 23 | while ( line != null ) { 24 | input += line; 25 | line = sr.ReadLine(); 26 | } 27 | 28 | sr.Close(); 29 | 30 | return new JSONObject ( input, -2, false, false ); 31 | #endif 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFReader.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b2643ab37120404da1c4888e0dae5eb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFReflector.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | import System; 4 | 5 | public class OFReflector { 6 | private static var plugins : OFPlugin []; 7 | 8 | public static function GetPlugin ( type : System.Type ) : OFPlugin { 9 | if ( !plugins ) { 10 | plugins = GetPlugins (); 11 | } 12 | 13 | for ( var i : int = 0; i < plugins.Length; i++ ) { 14 | if ( plugins[i].CheckType ( type ) ) { 15 | return plugins[i]; 16 | } 17 | } 18 | 19 | return null; 20 | } 21 | 22 | public static function GetPlugins () : OFPlugin [] { 23 | if ( !plugins ) { 24 | var types : List.< OFPlugin > = new List.< OFPlugin > (); 25 | 26 | for ( var assembly : System.Reflection.Assembly in AppDomain.CurrentDomain.GetAssemblies () ) { 27 | if ( assembly.FullName.StartsWith ( "Mono.Cecil" ) ) { 28 | continue; 29 | 30 | } else if ( assembly.FullName.StartsWith ( "UnityScript" ) ) { 31 | continue; 32 | 33 | } else if ( assembly.FullName.StartsWith ( "Boo.Lan" ) ) { 34 | continue; 35 | 36 | } else if ( assembly.FullName.StartsWith ( "System" ) ) { 37 | continue; 38 | 39 | } else if ( assembly.FullName.StartsWith ( "I18N" ) ) { 40 | continue; 41 | 42 | } else if ( assembly.FullName.StartsWith ( "UnityEngine" ) ) { 43 | continue; 44 | 45 | } else if ( assembly.FullName.StartsWith ( "UnityEditor" ) ) { 46 | continue; 47 | 48 | } else if ( assembly.FullName.StartsWith ( "mscorlib" ) ) { 49 | continue; 50 | 51 | } 52 | 53 | for ( var type : System.Type in assembly.GetTypes () ) { 54 | if ( !type.IsClass ) { 55 | continue; 56 | 57 | } else if ( type.IsAbstract ) { 58 | continue; 59 | 60 | } else if ( !type.IsSubclassOf ( typeof ( OFPlugin ) ) ) { 61 | continue; 62 | 63 | } 64 | 65 | types.Add ( System.Activator.CreateInstance ( type ) as OFPlugin ); 66 | } 67 | } 68 | 69 | plugins = types.ToArray (); 70 | } 71 | 72 | return plugins; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFReflector.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a2bf429cea2843f69c2e826a0cd6ee8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFSerializedObject.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2ea243763544457196520f74b0cea7b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFSerializer.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 354cd7074afb14837a918855dd07ccfb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFWeb.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OFWeb { 4 | private static var tempStorage : Dictionary.< String, JSONObject > = new Dictionary.< String, JSONObject > (); 5 | 6 | public static function Set ( path : String, obj : JSONObject ) { 7 | tempStorage[path] = obj; 8 | } 9 | 10 | public static function Get ( path : String ) : JSONObject { 11 | return tempStorage[path]; 12 | } 13 | 14 | public static function Clear () { 15 | tempStorage.Clear (); 16 | } 17 | 18 | public static function IsWebPlayer () : boolean { 19 | return ( Application.platform == RuntimePlatform.OSXWebPlayer || Application.platform == RuntimePlatform.WindowsWebPlayer ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFWeb.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa505e0ef6cbe44948bf7c4d93030086 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFWriter.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | import System.IO; 4 | 5 | public class OFWriter { 6 | public static function SaveFile ( input : JSONObject, path : String ) { 7 | #if UNITY_WEBPLAYER && !UNITY_EDITOR 8 | OFWeb.Set ( path, input ); 9 | #else 10 | var sw : StreamWriter; 11 | 12 | if ( !File.Exists ( path ) ) { 13 | sw = File.CreateText ( path ); 14 | } else { 15 | sw = new StreamWriter ( path ); 16 | } 17 | 18 | sw.WriteLine ( input ); 19 | sw.Flush(); 20 | sw.Close(); 21 | #endif 22 | } 23 | 24 | public static function SaveScene ( parent : GameObject, path : String ) { 25 | var allObjects : OFSerializedObject[] = parent.GetComponentsInChildren. (); 26 | var output : JSONObject = new JSONObject ( JSONObject.Type.ARRAY ); 27 | 28 | for ( var i : int = 0; i < allObjects.Length; i++ ) { 29 | output.Add ( OFSerializer.Serialize ( allObjects[i] ) ); 30 | } 31 | 32 | SaveFile ( output, path ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenFile/OFWriter.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fdc85ec358dd45888050fadc1b01831 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f987df3d5f6657f47baa9670b5466dd8 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb1565a319e1a96499c147082e33b81e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b91b6b2580f624c9f9cbcb6e0f38483a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R.prefab -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71c50facf23474bf39105e5c98995d4b 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R_dynamic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R_dynamic.ttf -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R_dynamic.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35410564cecbc49e89c2567f01d103bd 3 | TrueTypeFontImporter: 4 | serializedVersion: 2 5 | fontSize: 72 6 | forceTextureCase: -2 7 | characterSpacing: 1 8 | characterPadding: 0 9 | includeFontData: 1 10 | use2xBehaviour: 0 11 | fontNames: [] 12 | customCharacters: 13 | fontRenderingMode: 0 14 | userData: 15 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R_unicode.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R_unicode.ttf -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Fonts/Ubuntu/Ubuntu-R_unicode.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 982cfcac22074472c9a121eb0860919f 3 | TrueTypeFontImporter: 4 | serializedVersion: 2 5 | fontSize: 72 6 | forceTextureCase: -1 7 | characterSpacing: 1 8 | characterPadding: 0 9 | includeFontData: 1 10 | use2xBehaviour: 0 11 | fontNames: [] 12 | customCharacters: 13 | fontRenderingMode: 0 14 | userData: 15 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f06fa7e4f96e0446990afa7199706e1 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGButton.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | class OGButton extends OGWidget { 4 | public var hiddenString : String; 5 | public var text : String = ""; 6 | public var target : GameObject; 7 | public var message : String; 8 | public var argument : String; 9 | public var func : Function; 10 | public var action : System.Action; 11 | public var actionWithArgument : System.Action.< String >; 12 | public var argumentSource : MonoBehaviour; 13 | public var argumentSourceField : String = ""; 14 | public var enableImage : boolean = false; 15 | public var imageScale : float = 1; 16 | public var imageOffset : Vector2 = Vector2.zero; 17 | 18 | private var isDown : boolean = false; 19 | 20 | 21 | //////////////////// 22 | // Rects 23 | //////////////////// 24 | private function GetImageRect () : Rect { 25 | return new Rect ( drawRct.x + ( drawRct.width / 2 ) - ( ( drawRct.width * imageScale ) / 2 ) + imageOffset.x, drawRct.y + ( drawRct.height / 2 ) - ( ( drawRct.height * imageScale ) / 2 ) - imageOffset.y, drawRct.width * imageScale, drawRct.height * imageScale ); 26 | } 27 | 28 | 29 | //////////////////// 30 | // Interact 31 | //////////////////// 32 | override function OnMouseUp () { 33 | if ( func ) { 34 | if ( !String.IsNullOrEmpty ( argument ) ) { 35 | func ( argument ); 36 | 37 | } else { 38 | func (); 39 | 40 | } 41 | 42 | } else if ( action ) { 43 | action (); 44 | 45 | } else if ( actionWithArgument && !String.IsNullOrEmpty ( argument ) ) { 46 | actionWithArgument ( argument ); 47 | 48 | } else if ( target != null && !String.IsNullOrEmpty ( message ) ) { 49 | // if the source widget and source field are set then we 50 | // get the argument from this 51 | if ( argumentSource != null && !String.IsNullOrEmpty( argumentSourceField ) ) { 52 | target.SendMessage( message, argumentSource.GetType().GetField( argumentSourceField ).GetValue( argumentSource ) ); 53 | } else if ( !String.IsNullOrEmpty ( argument ) ) { 54 | target.SendMessage ( message, argument ); 55 | } else { 56 | target.SendMessage ( message, this ); 57 | } 58 | 59 | } else { 60 | Debug.LogWarning ( "OGButton '" + this.gameObject.name + "' | Target/message missing!" ); 61 | 62 | } 63 | 64 | OnMouseCancel (); 65 | } 66 | 67 | override function OnMouseCancel () { 68 | isDown = false; 69 | GetRoot().ReleaseWidget (); 70 | } 71 | 72 | override function OnMouseDown () { 73 | isDown = true; 74 | } 75 | 76 | 77 | //////////////////// 78 | // Update 79 | //////////////////// 80 | override function UpdateWidget () { 81 | // Persistent vars 82 | isSelectable = true; 83 | 84 | // Styles 85 | if ( isDisabled ) { 86 | currentStyle = styles.disabled; 87 | } else if ( isDown ) { 88 | currentStyle = styles.active; 89 | } else if ( CheckMouseOver() ) { 90 | currentStyle = styles.hover; 91 | } else { 92 | currentStyle = styles.basic; 93 | } 94 | 95 | // Mouse 96 | mouseRct = drawRct; 97 | } 98 | 99 | 100 | //////////////////// 101 | // Draw 102 | //////////////////// 103 | override function DrawSkin () { 104 | if ( currentStyle == null ) { return; } 105 | 106 | OGDrawHelper.DrawSlicedSprite ( drawRct, currentStyle, drawDepth, tint, clipTo ); 107 | 108 | if ( enableImage ) { 109 | OGDrawHelper.DrawSprite ( GetImageRect(), styles.thumb, drawDepth, tint, clipTo ); 110 | } 111 | } 112 | 113 | override function DrawText () { 114 | OGDrawHelper.DrawLabel ( drawRct, text, currentStyle.text, drawDepth, tint, clipTo ); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGButton.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b939f26117da42740bc71b621d68273d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGCameraWindow.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | class OGCameraWindow extends OGWidget { 4 | public var targetCamera : Camera; 5 | 6 | private var rootCamera : Camera; 7 | 8 | override function UpdateWidget () { 9 | if ( targetCamera ) { 10 | if ( !rootCamera ) { 11 | rootCamera = GetRoot().GetComponent(Camera); 12 | } 13 | 14 | targetCamera.rect = new Rect ( drawRct.x / Screen.width, drawRct.y / Screen.height, drawRct.width / Screen.width, drawRct.height / Screen.height ); 15 | 16 | // The target camera needs to render after the root camera 17 | if ( targetCamera.depth <= rootCamera.depth ) { 18 | targetCamera.depth = rootCamera.depth + 1; 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGCameraWindow.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2086d12c5bcca9840805dda943e78504 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGDrawHelper.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90d8581177f457846b325c9bfa777860 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGDropContainer.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | class OGDropContainer extends OGWidget { 4 | public var displayName : boolean = true; 5 | public var containedObject : OGWidget; 6 | public var containedScale : float = 1; 7 | public var target : GameObject; 8 | public var droppedMessage : String; 9 | public var clearedMessage : String; 10 | 11 | 12 | //////////////////// 13 | // Interact 14 | //////////////////// 15 | private function GetTouch () : TouchPhase { 16 | if ( Input.touchCount < 1 ) { 17 | return -1; 18 | 19 | } else { 20 | var touch : Touch = Input.GetTouch ( 0 ); 21 | 22 | return touch.phase; 23 | } 24 | } 25 | 26 | public function Clear () { 27 | if ( containedObject ) { 28 | Destroy ( containedObject.gameObject ); 29 | 30 | if ( target && !String.IsNullOrEmpty ( clearedMessage ) ) { 31 | target.SendMessage ( clearedMessage ); 32 | } 33 | } 34 | } 35 | 36 | 37 | //////////////////// 38 | // Update 39 | //////////////////// 40 | override function UpdateWidget () { 41 | // Persistent vars 42 | isSelectable = true; 43 | 44 | if ( CheckMouseOver () ) { 45 | currentStyle = styles.hover; 46 | } else { 47 | currentStyle = styles.basic; 48 | } 49 | 50 | // Mouse 51 | if ( Input.GetMouseButtonUp ( 0 ) || GetTouch () == TouchPhase.Ended ) { 52 | if ( OGRoot.GetInstance().downWidget && CheckMouseOver() ) { 53 | if ( containedObject ) { 54 | Destroy ( containedObject.gameObject ); 55 | } 56 | 57 | containedObject = Instantiate ( OGRoot.GetInstance().downWidget ); 58 | containedObject.gameObject.name = containedObject.gameObject.name.Replace ( "(Clone)", "" ); 59 | containedObject.transform.parent = this.transform; 60 | containedObject.transform.localScale = new Vector3 ( containedScale, containedScale, 1 ); 61 | containedObject.transform.localPosition = new Vector3 ( 0, 0, -1 ); 62 | containedObject.isSelectable = false; 63 | containedObject.isDraggable = false; 64 | 65 | if ( target && !String.IsNullOrEmpty ( droppedMessage ) ) { 66 | target.SendMessage ( droppedMessage, this ); 67 | } 68 | } 69 | } 70 | 71 | mouseRct = drawRct; 72 | } 73 | 74 | 75 | //////////////////// 76 | // Draw 77 | //////////////////// 78 | override function DrawSkin () { 79 | if ( currentStyle == null ) { return; } 80 | 81 | OGDrawHelper.DrawSlicedSprite ( drawRct, currentStyle, drawDepth, tint, clipTo ); 82 | } 83 | 84 | override function DrawText () { 85 | if ( currentStyle == null ) { return; } 86 | 87 | if ( containedObject != null && displayName ) { 88 | OGDrawHelper.DrawLabel ( drawRct, containedObject.gameObject.name, currentStyle.text, drawDepth, tint, clipTo ); 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGDropContainer.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70165d08a367e4aac9a0b98eb911f890 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGDropDown.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a395b1f620fb364f87750580b8f0672 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGFieldContainer.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2fbacf71a0b24e51a5ccdfadc69b7c1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGFont.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGCharacterInfo { 4 | public var index : int; 5 | public var width : float; 6 | public var uv : Rect; 7 | public var vert : Rect; 8 | public var flipped : boolean; 9 | public var carriageReturn : boolean; 10 | } 11 | 12 | public class OGFontInfo { 13 | public var name : String; 14 | public var kerning : float; 15 | public var lineSpacing : float; 16 | public var ascent : float; 17 | public var convertCase : int; 18 | public var characterPadding : int; 19 | public var characterSpacing : int; 20 | public var size : int; 21 | public var characterRects : OGCharacterInfo[]; 22 | } 23 | 24 | public class OGFont extends MonoBehaviour { 25 | public var bitmapFont : Font; 26 | public var dynamicFont : Font; 27 | public var info : OGFontInfo; 28 | public var atlasSize : Vector2; 29 | 30 | public function UpdateData () { 31 | #if UNITY_EDITOR 32 | var s : SerializedObject = new SerializedObject ( bitmapFont ); 33 | 34 | info.name = s.FindProperty ( "m_Name" ).stringValue; 35 | info.kerning = s.FindProperty ( "m_Kerning" ).floatValue; 36 | info.lineSpacing = s.FindProperty ( "m_LineSpacing" ).floatValue; 37 | info.ascent = s.FindProperty ( "m_Ascent" ).floatValue; 38 | info.characterPadding = s.FindProperty ( "m_CharacterPadding" ).intValue; 39 | info.characterSpacing = s.FindProperty ( "m_CharacterSpacing" ).intValue; 40 | info.convertCase = s.FindProperty ( "m_ConvertCase" ).intValue; 41 | 42 | var size : int = s.FindProperty ( "m_CharacterRects.Array.size" ).intValue; 43 | info.characterRects = new OGCharacterInfo[size]; 44 | 45 | for ( var i : int = 0; i < size; i++ ) { 46 | var ci : OGCharacterInfo = new OGCharacterInfo (); 47 | 48 | ci.index = s.FindProperty ( "m_CharacterRects.Array.data[" + i + "].index" ).intValue; 49 | ci.uv = s.FindProperty ( "m_CharacterRects.Array.data[" + i + "].uv" ).rectValue; 50 | ci.vert = s.FindProperty ( "m_CharacterRects.Array.data[" + i + "].vert" ).rectValue; 51 | ci.width = s.FindProperty ( "m_CharacterRects.Array.data[" + i + "].width" ).floatValue; 52 | ci.flipped = s.FindProperty ( "m_CharacterRects.Array.data[" + i + "].flipped" ).boolValue; 53 | 54 | if ( ci.index == "\n"[0] ) { 55 | ci.carriageReturn = true; 56 | } 57 | 58 | info.characterRects[i] = ci; 59 | } 60 | 61 | atlasSize = new Vector2 ( bitmapFont.material.mainTexture.width, bitmapFont.material.mainTexture.height ); 62 | #endif 63 | } 64 | 65 | public function GetCharacterInfo ( index : int ) : OGCharacterInfo { 66 | for ( var i : int = 0; i < info.characterRects.Length; i++ ) { 67 | if ( info.characterRects[i].index == index ) { 68 | return info.characterRects[i]; 69 | } 70 | } 71 | 72 | return null; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGFont.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3eca26852d36416c92c338709395154 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGLabel.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGLabel extends OGWidget { 4 | public var text : String = ""; 5 | public var overrideFontSize : boolean = false; 6 | public var fontSize : int; 7 | public var overrideAlignment : boolean = false; 8 | public var alignment : TextAnchor; 9 | 10 | @HideInInspector public var lineWidth : float = 0; 11 | 12 | private var lineHeight : float; 13 | private var spacing : float; 14 | private var oldString : String = ""; 15 | 16 | 17 | ///////////////// 18 | // Update 19 | ///////////////// 20 | override function UpdateWidget () { 21 | // Styles 22 | currentStyle = isDisabled ? styles.disabled : styles.basic; 23 | 24 | // Update data 25 | if ( !overrideFontSize ) { 26 | fontSize = currentStyle.text.fontSize; 27 | } 28 | 29 | if ( !overrideAlignment ) { 30 | alignment = currentStyle.text.alignment; 31 | } 32 | 33 | // Mouse 34 | mouseRct = drawRct; 35 | } 36 | 37 | 38 | ////////////////// 39 | // Draw 40 | ////////////////// 41 | override function DrawText () { 42 | if ( drawRct == null ) { return; } 43 | 44 | OGDrawHelper.DrawLabel ( drawRct, text, currentStyle.text, fontSize, alignment, drawDepth, tint, clipTo ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGLabel.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cf85498c81483e49b991b79d244577a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGLineNode.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGLineNode extends OGWidget { 4 | public class Connection { 5 | public var node : OGLineNode; 6 | public var segments : Vector3 [] = new Vector3 [0]; 7 | 8 | function Connection ( node : OGLineNode ) { 9 | this.node = node; 10 | } 11 | 12 | function Connection ( node : OGLineNode, segments : Vector3 [] ) { 13 | this.node = node; 14 | this.segments = segments; 15 | } 16 | 17 | public function SetSegment ( i : int, segment : Vector3 ) { 18 | var tmp : List.< Vector3 > = new List.< Vector3 > ( segments ); 19 | 20 | tmp.Insert ( i, segment ); 21 | 22 | segments = tmp.ToArray (); 23 | } 24 | } 25 | 26 | public var connections : Connection [] = new Connection [ 0 ]; 27 | 28 | public function AddConnection ( node : OGLineNode ) { 29 | AddConnection ( node, new Vector3 [0] ); 30 | } 31 | 32 | public function AddConnection ( node : OGLineNode, segments : Vector3 [] ) { 33 | var tmp : List.< Connection > = new List.< Connection > ( connections ); 34 | 35 | tmp.Add ( new Connection ( node, segments ) ); 36 | 37 | connections = tmp.ToArray (); 38 | } 39 | 40 | public function SetConnection ( i : int, node : OGLineNode ) { 41 | SetConnection ( i, node, new Vector3 [0] ); 42 | } 43 | 44 | public function SetConnection ( i : int, node : OGLineNode, segments : Vector3 [] ) { 45 | var tmp : List.< Connection > = new List.< Connection > ( connections ); 46 | 47 | if ( i >= tmp.Count ) { 48 | for ( var n : int = tmp.Count; n <= i; n++ ) { 49 | tmp.Add ( null ); 50 | } 51 | } 52 | 53 | tmp[i] = new Connection ( node, segments ); 54 | 55 | connections = tmp.ToArray (); 56 | } 57 | 58 | override function DrawLine () { 59 | for ( var i : int = 0; i < connections.Length; i++ ) { 60 | if ( connections[i] != null && connections[i].node != null ) { 61 | if ( connections[i].segments.Length == 0 ) { 62 | OGDrawHelper.DrawLine ( drawRct.center, connections[i].node.drawRct.center, drawDepth ); 63 | 64 | } else { 65 | for ( var s : int = 0; s < connections[i].segments.Length; s++ ) { 66 | if ( s == 0 ) { 67 | OGDrawHelper.DrawLine ( drawRct.center, drawRct.center + connections[i].segments[s], drawDepth ); 68 | 69 | } else if ( s == connections[i].segments.Length - 1 ) { 70 | OGDrawHelper.DrawLine ( drawRct.center + connections[i].segments[s-1], drawRct.center + connections[i].segments[s], drawDepth ); 71 | OGDrawHelper.DrawLine ( drawRct.center + connections[i].segments[s], connections[i].node.drawRct.center, drawDepth ); 72 | 73 | } else { 74 | OGDrawHelper.DrawLine ( drawRct.center + connections[i].segments[s-1], drawRct.center + connections[i].segments[s], drawDepth ); 75 | 76 | } 77 | } 78 | 79 | } 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGLineNode.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b796bbaab3612be4bac5e5d21487ca77 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGListItem.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | class OGListItem extends OGWidget { 4 | public var text : String = ""; 5 | public var isSelected : boolean = false; 6 | public var isTicked : boolean = false; 7 | public var object : Object; 8 | public var target : GameObject; 9 | public var message : String; 10 | public var hoverMessage : String; 11 | public var argument : String; 12 | public var func : Function; 13 | public var hoverFunc : Function; 14 | 15 | 16 | ////////////////// 17 | // Interaction 18 | ////////////////// 19 | private function Select () { 20 | isSelected = true; 21 | 22 | for ( var li : OGListItem in this.transform.parent.GetComponentsInChildren.() ) { 23 | if ( li != this ) { 24 | li.isSelected = false; 25 | } 26 | } 27 | 28 | if ( hoverFunc ) { 29 | hoverFunc (); 30 | } 31 | 32 | if ( target != null ) { 33 | if ( !String.IsNullOrEmpty ( hoverMessage ) ) { 34 | if ( !String.IsNullOrEmpty ( argument ) ) { 35 | target.SendMessage ( hoverMessage, argument ); 36 | 37 | } else if ( object != null ) { 38 | target.SendMessage ( hoverMessage, object ); 39 | 40 | } else { 41 | target.SendMessage ( hoverMessage, this ); 42 | 43 | } 44 | } 45 | } 46 | } 47 | 48 | private function Action () { 49 | if ( func ) { 50 | func (); 51 | } 52 | 53 | if ( target != null ) { 54 | if ( !String.IsNullOrEmpty ( message ) ) { 55 | if ( !String.IsNullOrEmpty ( argument ) ) { 56 | target.SendMessage ( message, argument ); 57 | 58 | } else if ( object != null ) { 59 | target.SendMessage ( message, object ); 60 | 61 | } else { 62 | target.SendMessage ( message, this ); 63 | 64 | } 65 | } 66 | } 67 | } 68 | 69 | private function Tick () { 70 | isTicked = true; 71 | 72 | for ( var li : OGListItem in this.transform.parent.GetComponentsInChildren.() ) { 73 | if ( li != this ) { 74 | li.isTicked = false; 75 | } 76 | } 77 | } 78 | 79 | override function OnMouseCancel () { 80 | isSelected = false; 81 | } 82 | 83 | override function OnMouseDown () { 84 | if ( !isDisabled ) { 85 | Action (); 86 | Tick (); 87 | } 88 | } 89 | 90 | override function OnMouseOver () { 91 | if ( !isSelected && !isDisabled ) { 92 | Select (); 93 | } 94 | } 95 | 96 | 97 | ////////////////// 98 | // Update 99 | ////////////////// 100 | override function UpdateWidget () { 101 | // Persistent vars 102 | isSelectable = true; 103 | 104 | // Mouse 105 | mouseRct = drawRct; 106 | 107 | // ^ Cancel check 108 | if ( !CheckMouseOver ( mouseRct ) ) { OnMouseCancel(); } 109 | 110 | // Styles 111 | if ( isDisabled ) { 112 | currentStyle = this.styles.disabled; 113 | } else if ( isSelected ) { 114 | currentStyle = this.styles.hover; 115 | } else if ( isTicked ) { 116 | currentStyle = this.styles.ticked; 117 | } else { 118 | currentStyle = this.styles.basic; 119 | } 120 | } 121 | 122 | ////////////////// 123 | // Draw 124 | ////////////////// 125 | override function DrawSkin () { 126 | OGDrawHelper.DrawSlicedSprite ( drawRct, currentStyle, drawDepth, tint, clipTo ); 127 | } 128 | 129 | override function DrawText () { 130 | OGDrawHelper.DrawLabel ( drawRct, text, currentStyle.text, drawDepth, tint, clipTo ); 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGListItem.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c0d12cf30edcc24f8ffff496b0cbbda 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGPage.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGPage extends MonoBehaviour { 4 | public var pageName : String = "New Page"; 5 | 6 | public function StartPage () {} 7 | public function UpdatePage () {} 8 | public function ExitPage () {} 9 | public function DrawPage () {} 10 | 11 | public function UpdateStyles () { 12 | for ( var w : OGWidget in this.transform.GetComponentsInChildren.(true) ) { 13 | w.styles.Refresh ( w.GetRoot().skin ); 14 | } 15 | } 16 | 17 | public function ResetStyles () { 18 | for ( var w : OGWidget in this.transform.GetComponentsInChildren.(true) ) { 19 | OGRoot.GetInstance().skin.ApplyDefaultStyles ( w ); 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGPage.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ece6f022ee9515a478aa268f54388303 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGPopUp.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | class OGPopUp extends OGWidget { 4 | public var title : String = ""; 5 | public var options : String[]; 6 | public var selectedOption : String; 7 | public var target : GameObject; 8 | public var message : String; 9 | public var passSelectedOption : boolean = false; 10 | public var isUp = false; 11 | 12 | private var timeStamp : float; 13 | 14 | 15 | //////////////////// 16 | // Data 17 | //////////////////// 18 | public function get selectedIndex () : int { 19 | for ( var i : int = 0; i < options.Length; i++ ) { 20 | if ( selectedOption == options[i] ) { 21 | return i; 22 | } 23 | } 24 | 25 | return 0; 26 | } 27 | 28 | 29 | //////////////////// 30 | // Options 31 | //////////////////// 32 | private function GetOptionRect ( i : int ) : Rect { 33 | var bottom : float = drawRct.y - options.Length * drawRct.height; 34 | var top : float = drawRct.y + options.Length * drawRct.height; 35 | 36 | if ( bottom < 0 || clipTo && bottom < clipTo.drawRct.y ) { 37 | return new Rect ( drawRct.x, top - ( i * drawRct.height ), drawRct.width, drawRct.height ); 38 | } else { 39 | return new Rect ( drawRct.x, drawRct.y - ( ( 1 + i ) * drawRct.height ), drawRct.width, drawRct.height ); 40 | } 41 | } 42 | 43 | private function GetOptionStyle ( i : int ) : OGStyle { 44 | return ( CheckMouseOver ( GetOptionRect ( i ) ) ) ? styles.hover : styles.basic; 45 | } 46 | 47 | private function GetMouseOverOption () : int { 48 | for ( var i : int = 0; i < options.Length; i++ ) { 49 | if ( CheckMouseOver ( GetOptionRect ( i ) ) ) { 50 | return i; 51 | } 52 | } 53 | 54 | return -1; 55 | } 56 | 57 | private function GetExpandedRect () : Rect { 58 | var bottom : float = drawRct.y - options.Length * drawRct.height; 59 | 60 | if ( bottom < 0 || clipTo && bottom < clipTo.drawRct.y ) { 61 | return new Rect ( drawRct.x, drawRct.y, drawRct.width, drawRct.height * ( options.Length + 1 ) ); 62 | } else { 63 | return new Rect ( drawRct.x, bottom, drawRct.width, drawRct.height * ( options.Length + 1 ) ); 64 | } 65 | } 66 | 67 | public function SetOptions ( list : String[] ) { 68 | options = list; 69 | } 70 | 71 | 72 | //////////////////// 73 | // Interaction 74 | //////////////////// 75 | override function OnMouseUp () { 76 | var mouseOverOption : int = GetMouseOverOption (); 77 | 78 | if ( Time.time - timeStamp > 0.5 || mouseOverOption != -1 ) { 79 | OnMouseCancel (); 80 | } 81 | 82 | if ( mouseOverOption != -1 ) { 83 | selectedOption = options[mouseOverOption]; 84 | 85 | if ( target != null && !String.IsNullOrEmpty ( message ) ) { 86 | if ( passSelectedOption ) { 87 | target.SendMessage ( message, selectedOption ); 88 | } else { 89 | target.SendMessage ( message ); 90 | } 91 | } 92 | 93 | isUp = false; 94 | } 95 | } 96 | 97 | override function OnMouseDown () { 98 | if ( !isUp && GetMouseOverOption() == -1 ) { 99 | isUp = true; 100 | timeStamp = Time.time; 101 | } 102 | } 103 | 104 | override function OnMouseCancel () { 105 | isUp = false; 106 | 107 | OGRoot.GetInstance().ReleaseWidget (); 108 | } 109 | 110 | 111 | //////////////////// 112 | // Update 113 | //////////////////// 114 | override function UpdateWidget () { 115 | // Persistent vars 116 | isSelectable = true; 117 | 118 | // Update data 119 | isAlwaysOnTop = isUp; 120 | 121 | // Mouse 122 | if ( isUp ) { 123 | mouseRct = GetExpandedRect (); 124 | } else { 125 | mouseRct = drawRct; 126 | } 127 | 128 | // Styles 129 | if ( isDisabled ) { 130 | currentStyle = styles.disabled; 131 | } else if ( isUp ) { 132 | currentStyle = styles.active; 133 | } else { 134 | currentStyle = styles.basic; 135 | } 136 | } 137 | 138 | 139 | /////////////////// 140 | // Draw 141 | /////////////////// 142 | override function DrawSkin () { 143 | if ( isUp ) { 144 | OGDrawHelper.DrawSlicedSprite ( GetExpandedRect(), currentStyle, drawDepth, tint, clipTo ); 145 | } else { 146 | OGDrawHelper.DrawSlicedSprite ( drawRct, currentStyle, drawDepth, tint, clipTo ); 147 | } 148 | } 149 | 150 | override function DrawText () { 151 | if ( isUp ) { 152 | OGDrawHelper.DrawLabel ( drawRct, title, styles.basic.text, drawDepth, tint, clipTo ); 153 | 154 | for ( var i : int = 0; i < options.Length; i++ ) { 155 | OGDrawHelper.DrawLabel ( GetOptionRect ( i ), options[i], GetOptionStyle ( i ).text, drawDepth, tint, clipTo ); 156 | } 157 | } else if ( !String.IsNullOrEmpty ( selectedOption ) ) { 158 | OGDrawHelper.DrawLabel ( drawRct, selectedOption, currentStyle.text, drawDepth, tint, clipTo ); 159 | } else { 160 | OGDrawHelper.DrawLabel ( drawRct, title, currentStyle.text, drawDepth, tint, clipTo ); 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGPopUp.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85036f9f458ddb440b8cf020cb2bed1a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGProgressBar.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGProgressBar extends OGWidget { 4 | public enum LayoutType { 5 | Horizontal, 6 | Vertical 7 | } 8 | 9 | public var value : float = 0.5; 10 | public var padding : Vector2; 11 | public var type : LayoutType; 12 | 13 | public function SetValue ( value : float ) { 14 | if ( this.value == value ) { return; } 15 | 16 | this.value = value; 17 | value = Mathf.Clamp ( value, 0, 1 ); 18 | } 19 | 20 | private function GetThumbRect () : Rect { 21 | if ( type == LayoutType.Horizontal ) { 22 | return new Rect ( drawRct.x + padding.x, drawRct.y + padding.y, ( drawRct.width - ( padding.x * 2 ) ) * value, drawRct.height - ( padding.y * 2 ) ); 23 | } else { 24 | return new Rect ( drawRct.x + padding.x, drawRct.y + padding.y, ( drawRct.width - ( padding.x * 2 ) ), (drawRct.height - ( padding.y * 2 )) * value ); 25 | 26 | } 27 | } 28 | 29 | 30 | ///////////////// 31 | // Draw 32 | ///////////////// 33 | override function DrawSkin () { 34 | // Background 35 | OGDrawHelper.DrawSlicedSprite ( drawRct, styles.basic, drawDepth, tint, clipTo ); 36 | 37 | // Thumb 38 | OGDrawHelper.DrawSprite ( GetThumbRect (), styles.thumb, drawDepth, tint, clipTo ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGProgressBar.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5991fcaaf1e036d4e95ed9634cca37b7 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGRoot.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e5734da34424da42a06790d50338a49 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGScrollView.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 668593e9100cece4e85d4003565bc41f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGSkin.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f50b42847b9f211448b0f91d4f629a64 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGSlicedSprite.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGSlicedSprite extends OGWidget { 4 | public var tile : Vector2 = Vector2.one; 5 | 6 | ////////////////// 7 | // Update 8 | ////////////////// 9 | override function UpdateWidget () { 10 | mouseRct = drawRct; 11 | } 12 | 13 | 14 | ////////////////// 15 | // Draw 16 | ////////////////// 17 | override function DrawSkin () { 18 | if ( drawRct == null ) { return; } 19 | 20 | if ( tile.x == 1 && tile.y == 1 ) { 21 | OGDrawHelper.DrawSlicedSprite ( drawRct, styles.basic, drawDepth, tint, clipTo ); 22 | 23 | } else { 24 | OGDrawHelper.DrawTiledSlicedSprite ( drawRct, styles.basic, drawDepth, tint, tile.x, tile.y, clipTo ); 25 | 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGSlicedSprite.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf7ad9f3468794f4ea38d72dd7e11647 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGSlider.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGSlider extends OGWidget { 4 | public var sliderValue : float = 0; 5 | public var sliderLabel : OGLabel; 6 | public var backgroundHeight : float = 0.25; 7 | public var toPercent : boolean = true; 8 | public var suffix : String = ""; 9 | 10 | 11 | //////////////// 12 | // Rects 13 | //////////////// 14 | private function GetThumbRect () : Rect { 15 | return new Rect ( drawRct.x + ( sliderValue * drawRct.width ) - ( drawRct.height / 2 ), drawRct.y, drawRct.height, drawRct.height ); 16 | } 17 | 18 | private function GetBackgroundRect () : Rect { 19 | return new Rect ( drawRct.x, drawRct.y + ( drawRct.height / 2 ) - ( ( drawRct.height * backgroundHeight ) / 2 ), drawRct.width, drawRct.height * backgroundHeight ); 20 | } 21 | 22 | 23 | //////////////// 24 | // Mouse 25 | //////////////// 26 | override function OnMouseDrag () { 27 | if ( sliderValue >= 0 && sliderValue <= 1 ) { 28 | sliderValue = ( Input.mousePosition.x - 10 - this.transform.position.x ) / this.transform.lossyScale.x; 29 | } 30 | 31 | 32 | sliderValue = Mathf.Clamp ( Mathf.Round ( sliderValue * 100 ) / 100, 0, 1 ); 33 | } 34 | 35 | override function OnMouseCancel () { 36 | GetRoot().ReleaseWidget(); 37 | } 38 | 39 | override function OnMouseUp () { 40 | GetRoot().ReleaseWidget(); 41 | } 42 | 43 | 44 | //////////////// 45 | // Update 46 | //////////////// 47 | override function UpdateWidget () { 48 | // Persistent vars 49 | isSelectable = true; 50 | 51 | // Mouse 52 | mouseRct = CombineRects ( GetThumbRect(), GetBackgroundRect() ); 53 | 54 | // Update data 55 | if ( sliderLabel ) { 56 | if ( toPercent ) { 57 | sliderLabel.text = ( sliderValue * 100 ).ToString() + suffix; 58 | } else { 59 | sliderLabel.text = sliderValue.ToString() + suffix; 60 | } 61 | } 62 | } 63 | 64 | 65 | //////////////// 66 | // Draw 67 | //////////////// 68 | override function DrawSkin () { 69 | // Background 70 | OGDrawHelper.DrawSprite ( GetBackgroundRect(), styles.basic, drawDepth, tint, clipTo ); 71 | 72 | // Thumb 73 | if ( isDisabled ) { 74 | OGDrawHelper.DrawSlicedSprite ( GetThumbRect(), styles.disabled, drawDepth, tint, clipTo ); 75 | } else { 76 | OGDrawHelper.DrawSlicedSprite ( GetThumbRect(), styles.thumb, drawDepth, tint, clipTo ); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGSlider.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4eff7eb68f1d5be46a37c57738e8485b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGSprite.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGSprite extends OGWidget { 4 | public var tile : Vector2 = Vector2.one; 5 | 6 | ////////////////// 7 | // Draw 8 | ////////////////// 9 | override function DrawSkin () { 10 | if ( drawCrd == null || drawRct == null ) { return; } 11 | 12 | if ( tile.x != 1 || tile.y != 1 ) { 13 | OGDrawHelper.DrawTiledSprite ( drawRct, styles.basic, drawDepth, tint, tile.x, tile.y, clipTo ); 14 | } else { 15 | OGDrawHelper.DrawSprite ( drawRct, styles.basic, drawDepth, tint, clipTo ); 16 | } 17 | } 18 | 19 | //////////////// 20 | // Update 21 | //////////////// 22 | override function UpdateWidget () { 23 | tile.x = Mathf.Floor ( tile.x ); 24 | tile.y = Mathf.Floor ( tile.y ); 25 | 26 | mouseRct = drawRct; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGSprite.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0d0bc449a04bfd4495496d7876b9dba 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTabs.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGTabs extends OGWidget { 4 | public class Tab { 5 | public var title : String = "Tab"; 6 | public var content : GameObject; 7 | } 8 | 9 | public var activeTab : int; 10 | public var tabs : List. = new List.(); 11 | 12 | 13 | ////////////////// 14 | // Rects 15 | ////////////////// 16 | private function GetTabRect ( i : int ) : Rect { 17 | var tabWidth : float = drawRct.width / tabs.Count; 18 | return new Rect ( drawRct.x + ( i * tabWidth ), drawRct.y, tabWidth, drawRct.height ); 19 | } 20 | 21 | private function GetTabStyle ( i : int ) : OGStyle { 22 | if ( isDisabled ) { 23 | return styles.disabled; 24 | } else if ( i == activeTab ) { 25 | return styles.active; 26 | } else { 27 | return styles.basic; 28 | } 29 | } 30 | 31 | 32 | ////////////////// 33 | // Management 34 | ////////////////// 35 | public function AddTab ( tabName : String, tabObject : GameObject, switchTo : boolean ) { 36 | var newTab : Tab = new Tab (); 37 | 38 | newTab.title = tabName; 39 | newTab.content = tabObject; 40 | 41 | tabs.Add ( newTab ); 42 | 43 | if ( switchTo ) { 44 | SetActiveTab ( tabs.Count - 1 ); 45 | } else if ( tabs.Count < 2 ) { 46 | SetActiveTab ( 0 ); 47 | } 48 | } 49 | 50 | public function ClearTabs () { 51 | tabs.Clear (); 52 | activeTab = -1; 53 | } 54 | 55 | public function SetActiveTab ( n : String ) { 56 | SetActiveTab ( int.Parse ( n ) ); 57 | } 58 | 59 | public function SetActiveTab ( tab : int ) { 60 | activeTab = tab; 61 | 62 | for ( var i : int = 0; i < tabs.Count; i++ ) { 63 | if ( tabs[i].content ) { 64 | tabs[i].content.SetActive ( i == activeTab ); 65 | } 66 | } 67 | } 68 | 69 | 70 | ////////////////// 71 | // Mouse 72 | ////////////////// 73 | override function OnMouseDown () { 74 | for ( var i : int = 0; i < tabs.Count; i++ ) { 75 | if ( CheckMouseOver ( GetTabRect ( i ) ) ) { 76 | SetActiveTab ( i ); 77 | } 78 | } 79 | } 80 | 81 | override function OnMouseUp () { 82 | GetRoot().ReleaseWidget(); 83 | } 84 | 85 | override function OnMouseCancel () { 86 | GetRoot().ReleaseWidget(); 87 | } 88 | 89 | 90 | ////////////////// 91 | // Update 92 | ////////////////// 93 | override function UpdateWidget () { 94 | isSelectable = true; 95 | 96 | // Mouse 97 | mouseRct = drawRct; 98 | 99 | // Update data 100 | if ( activeTab >= tabs.Count && tabs.Count > 0 ) { 101 | SetActiveTab ( tabs.Count - 1 ); 102 | } 103 | } 104 | 105 | 106 | ////////////////// 107 | // Draw 108 | ////////////////// 109 | override function DrawSkin () { 110 | for ( var i : int = 0; i < tabs.Count; i++ ) { 111 | OGDrawHelper.DrawSlicedSprite ( GetTabRect(i), GetTabStyle(i), drawDepth, tint, clipTo ); 112 | } 113 | } 114 | 115 | override function DrawText () { 116 | for ( var i : int = 0; i < tabs.Count; i++ ) { 117 | OGDrawHelper.DrawLabel ( GetTabRect(i), tabs[i].title, GetTabStyle(i).text, drawDepth, tint, clipTo ); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTabs.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 710228318d2b91649934e6695474f3d9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTextField.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGTextField extends OGWidget { 4 | enum RegExPreset { 5 | None, 6 | OnlyNumbers, 7 | OnlyNumbersAndPeriod, 8 | OnlyASCII, 9 | NoSpaces 10 | } 11 | 12 | public var locked : boolean = false; 13 | public var stealReturnKey : boolean = true; 14 | public var text : String = ""; 15 | public var maxLength : int = 30; 16 | public var regex : String; 17 | public var regexPreset : RegExPreset; 18 | 19 | @HideInInspector public var listening : boolean = false; 20 | 21 | private var currentPreset : RegExPreset = RegExPreset.None; 22 | 23 | 24 | ////////////////// 25 | // Interaction 26 | ////////////////// 27 | override function OnMouseDown () { 28 | listening = true; 29 | } 30 | 31 | override function OnMouseCancel () { 32 | listening = false; 33 | } 34 | 35 | 36 | ///////////////// 37 | // OnGUI draw 38 | ///////////////// 39 | // Steal TextEditor functionality from OnGUI 40 | public function OnGUI () { 41 | if ( isDrawn && listening ) { 42 | GUI.SetNextControlName ( "ActiveTextField" ); 43 | 44 | var style : GUIStyle = new GUIStyle(); 45 | style.normal.textColor = currentStyle.text.fontColor; 46 | style.font = currentStyle.text.font.dynamicFont; 47 | style.fontSize = currentStyle.text.fontSize; 48 | style.alignment = currentStyle.text.alignment; 49 | style.wordWrap = currentStyle.text.wordWrap; 50 | style.padding = currentStyle.text.padding; 51 | style.clipping = TextClipping.Clip; 52 | 53 | var c : Color = currentStyle.text.fontColor; 54 | GUI.skin.settings.selectionColor = new Color ( 1.0 - c.r, 1.0 - c.g, 1.0 - c.b, c.a ); 55 | 56 | var invertedRct : Rect = drawRct; 57 | invertedRct.y = Screen.height - invertedRct.y - invertedRct.height; 58 | 59 | if ( String.IsNullOrEmpty ( text ) ) { 60 | text = ""; 61 | } 62 | 63 | text = GUI.TextArea ( invertedRct, text, style ); 64 | 65 | var controlID : int = GUIUtility.GetControlID(drawRct.GetHashCode(), FocusType.Keyboard); 66 | var editor : TextEditor = GUIUtility.GetStateObject(typeof(TextEditor), controlID -1 ) as TextEditor; 67 | 68 | if ( !String.IsNullOrEmpty ( regex ) && regex != "\\" && regexPreset != RegExPreset.None ) { 69 | text = Regex.Replace ( text, "[" + regex + "]", "" ); 70 | } 71 | 72 | GUI.FocusControl ( "ActiveTextField" ); 73 | } 74 | } 75 | 76 | 77 | //////////////////// 78 | // Update 79 | //////////////////// 80 | override function UpdateWidget () { 81 | // Persistent vars 82 | isSelectable = true; 83 | 84 | // Update data 85 | mouseRct = drawRct; 86 | isAlwaysOnTop = listening; 87 | 88 | // Styles 89 | if ( isDisabled ) { 90 | currentStyle = styles.disabled; 91 | } else if ( listening ) { 92 | currentStyle = styles.active; 93 | } else { 94 | currentStyle = styles.basic; 95 | } 96 | 97 | // ^ Regex presets 98 | if ( regexPreset != currentPreset ) { 99 | currentPreset = regexPreset; 100 | 101 | if ( currentPreset == RegExPreset.None ) { 102 | regex = ""; 103 | 104 | } else if ( currentPreset == RegExPreset.OnlyNumbers ) { 105 | regex = "^0-9"; 106 | 107 | } else if ( currentPreset == RegExPreset.OnlyASCII ) { 108 | regex = "^a-zA-Z0-9"; 109 | 110 | } else if ( currentPreset == RegExPreset.NoSpaces ) { 111 | regex = " "; 112 | 113 | } else if ( currentPreset == RegExPreset.OnlyNumbersAndPeriod) { 114 | regex = "^0-9."; 115 | 116 | } 117 | } 118 | } 119 | 120 | 121 | ///////////////// 122 | // Draw 123 | ///////////////// 124 | override function DrawSkin () { 125 | OGDrawHelper.DrawSlicedSprite ( drawRct, currentStyle, drawDepth, tint, clipTo ); 126 | } 127 | 128 | override function DrawText () { 129 | if ( !listening ) { 130 | OGDrawHelper.DrawLabel ( drawRct, text, currentStyle.text, drawDepth, tint, this ); 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTextField.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22155d8efc0c0714a89f2f43a34fd92c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTexture.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGTexture extends OGWidget { 4 | public var mainTexture : Texture2D; 5 | 6 | private var material : Material; 7 | 8 | override function UpdateWidget () { 9 | 10 | mouseRct = drawRct; 11 | } 12 | 13 | override function DrawGL () { 14 | if ( drawRct == null || mainTexture == null ) { 15 | return; 16 | } 17 | 18 | if ( material == null ) { 19 | material = new Material ( GetRoot().skin.atlas.shader ); 20 | return; 21 | } 22 | 23 | if ( material.mainTexture != mainTexture ) { 24 | material.mainTexture = mainTexture; 25 | return; 26 | } 27 | 28 | var displayRct : Rect = drawRct; 29 | var uvRct : Rect = drawCrd; 30 | 31 | if ( clipTo ) { 32 | if ( clipTo.drawRct.xMin > displayRct.xMin ) { 33 | uvRct.xMin = ( clipTo.drawRct.xMin - displayRct.xMin ) / this.transform.lossyScale.x; 34 | displayRct.xMin = clipTo.drawRct.xMin; 35 | } 36 | 37 | if ( clipTo.drawRct.xMax < displayRct.xMax ) { 38 | uvRct.xMax = ( displayRct.xMax - clipTo.drawRct.xMax ) / this.transform.lossyScale.x; 39 | displayRct.xMax = clipTo.drawRct.xMax; 40 | } 41 | 42 | if ( clipTo.drawRct.yMin > displayRct.yMin ) { 43 | uvRct.yMin = ( clipTo.drawRct.yMin - displayRct.yMin ) / this.transform.lossyScale.y; 44 | displayRct.yMin = clipTo.drawRct.yMin; 45 | } 46 | 47 | if ( clipTo.drawRct.yMax < displayRct.yMax ) { 48 | uvRct.yMax = ( displayRct.yMax - clipTo.drawRct.yMax ) / this.transform.lossyScale.y; 49 | displayRct.yMax = clipTo.drawRct.yMax; 50 | } 51 | } 52 | 53 | GL.Begin(GL.QUADS); 54 | 55 | GL.Color ( tint ); 56 | 57 | material.SetPass ( 0 ); 58 | 59 | // Bottom Left 60 | GL.TexCoord2 ( uvRct.x, uvRct.y ); 61 | GL.Vertex3 ( displayRct.x, displayRct.y, drawDepth ); 62 | 63 | // Top left 64 | GL.TexCoord2 ( uvRct.x, uvRct.y + uvRct.height ); 65 | GL.Vertex3 ( displayRct.x, displayRct.y + displayRct.height, drawDepth ); 66 | 67 | // Top right 68 | GL.TexCoord2 ( uvRct.x + uvRct.width, uvRct.y + uvRct.height ); 69 | GL.Vertex3 ( displayRct.x + displayRct.width, displayRct.y + displayRct.height, drawDepth ); 70 | 71 | // Bottom right 72 | GL.TexCoord2 ( uvRct.x + uvRct.width, uvRct.y ); 73 | GL.Vertex3 ( displayRct.x + displayRct.width, displayRct.y, drawDepth ); 74 | 75 | GL.Color ( Color.white ); 76 | 77 | GL.End(); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTexture.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e56e459b97d51c4b9567269592cb638 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTickBox.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | public class OGTickBox extends OGWidget { 4 | public var text : String; 5 | public var isTicked : boolean; 6 | 7 | override function OnMouseDown () { 8 | isTicked = !isTicked; 9 | 10 | GetRoot().ReleaseWidget (); 11 | } 12 | 13 | 14 | //////////////// 15 | // Rects 16 | //////////////// 17 | private function GetTickRect () : Rect { 18 | return new Rect ( drawRct.x + drawRct.width - drawRct.height, drawRct.y, drawRct.height, drawRct.height ); 19 | } 20 | 21 | 22 | //////////////// 23 | // Update 24 | //////////////// 25 | override function UpdateWidget () { 26 | // Persistent vars 27 | isSelectable = true; 28 | 29 | // Mouse 30 | mouseRct = drawRct; 31 | 32 | // Styles 33 | if ( isDisabled ) { 34 | currentStyle = styles.disabled; 35 | } else if ( isTicked ) { 36 | currentStyle = styles.ticked; 37 | } else { 38 | currentStyle = styles.basic; 39 | } 40 | } 41 | 42 | 43 | //////////////// 44 | // Draw 45 | //////////////// 46 | override function DrawSkin () { 47 | OGDrawHelper.DrawSprite ( GetTickRect(), currentStyle, drawDepth, tint, clipTo ); 48 | } 49 | 50 | override function DrawText () { 51 | OGDrawHelper.DrawLabel ( drawRct, text, currentStyle.text, drawDepth, tint, clipTo ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTickBox.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9ba25bd75abba342b707f4313372411 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTween.js: -------------------------------------------------------------------------------- 1 | #pragma strict 2 | 3 | class OGTween extends MonoBehaviour { 4 | /* enum TweenMessageSend { 5 | Begin, 6 | Complete 7 | } 8 | 9 | private class TweenType { 10 | var enabled : boolean = false; 11 | var destination : Vector3; 12 | var time : float = 1.0; 13 | var easing : iTween.EaseType; 14 | } 15 | 16 | var move : TweenType; 17 | var rotate : TweenType; 18 | var scale : TweenType; 19 | 20 | var ignoreTimeScale : boolean = true; 21 | var autoPlay : boolean = false; 22 | 23 | var messageTarget : GameObject; 24 | var message : String; 25 | var argument : String; 26 | var func : Function; 27 | var sendMessageOn : TweenMessageSend = TweenMessageSend.Complete; 28 | 29 | @HideInInspector var timer : float = 0.0; 30 | @HideInInspector var timerStarted : boolean = false; 31 | 32 | @HideInInspector var startPos : Vector3; 33 | @HideInInspector var startRot : Vector3; 34 | @HideInInspector var startScl : Vector3; 35 | 36 | function OGCallBack () { 37 | if ( func ) { 38 | func (); 39 | return; 40 | } 41 | 42 | if ( !messageTarget ) { return; } 43 | if ( !message ) { return; } 44 | 45 | if ( argument ) { 46 | messageTarget.SendMessage ( message, argument ); 47 | } else { 48 | messageTarget.SendMessage ( message ); 49 | } 50 | } 51 | 52 | function FindGreatest () : float { 53 | var a : float = 0.0; 54 | var b : float = 0.0; 55 | var c : float = 0.0; 56 | 57 | if ( move.enabled ) { a = move.time; } 58 | if ( rotate.enabled ) { b = rotate.time; } 59 | if ( scale.enabled ) { c = scale.time; } 60 | 61 | return Mathf.Max ( a, b, c ); 62 | } 63 | 64 | function Play ( forward : boolean ) { 65 | if ( move.enabled ) { 66 | var moveDest : Vector3; 67 | 68 | if ( forward ) { moveDest = move.destination; } 69 | else { moveDest = startPos; } 70 | 71 | iTween.MoveTo ( gameObject, iTween.Hash ( 72 | "position", moveDest, 73 | "time", move.time, 74 | "easetype", move.easing, 75 | "islocal", true, 76 | "ignoretimescale", ignoreTimeScale, 77 | "onupdatetarget", this.gameObject, 78 | "onupdate", "SetDirty" 79 | ) ); 80 | } 81 | 82 | if ( rotate.enabled ) { 83 | var rotDest : Vector3; 84 | 85 | if ( forward ) { rotDest = rotate.destination; } 86 | else { rotDest = startRot; } 87 | 88 | iTween.RotateTo ( gameObject, iTween.Hash ( 89 | "rotation", rotDest, 90 | "time", rotate.time, 91 | "easetype", rotate.easing, 92 | "islocal", true, 93 | "ignoretimescale", ignoreTimeScale, 94 | "onupdatetarget", this.gameObject, 95 | "onupdate", "SetDirty" 96 | ) ); 97 | } 98 | 99 | if ( scale.enabled ) { 100 | var sclDest : Vector3; 101 | 102 | if ( forward ) { sclDest = scale.destination; } 103 | else { sclDest = startScl; } 104 | 105 | iTween.ScaleTo ( gameObject, iTween.Hash ( 106 | "scale", sclDest, 107 | "time", scale.time, 108 | "easetype", scale.easing, 109 | "islocal", true, 110 | "ignoretimescale", ignoreTimeScale, 111 | "onupdatetarget", this.gameObject, 112 | "onupdate", "SetDirty" 113 | ) ); 114 | } 115 | 116 | if ( sendMessageOn == TweenMessageSend.Begin ) { 117 | OGCallBack (); 118 | } else { 119 | timerStarted = true; 120 | timer = FindGreatest(); 121 | } 122 | } 123 | 124 | function Update () { 125 | if ( timerStarted && timer > 0.0 ) { 126 | timer -= Time.deltaTime; 127 | } else if ( timerStarted ) { 128 | OGCallBack(); 129 | } 130 | } 131 | 132 | function Start () { 133 | Time.timeScale = 1.0; 134 | 135 | startPos = transform.localPosition; 136 | startRot = transform.localEulerAngles; 137 | startScl = transform.localScale; 138 | 139 | if ( autoPlay ) { 140 | Play ( true ); 141 | } 142 | } 143 | */} 144 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGTween.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b13b334d287cd4c5792a30216d4e4cbf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Scripts/OGWidget.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b57158aa55ffb564697aae03f4a069d8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d6919fbf5560d64a92bf997e00394ff 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/3DText.shader: -------------------------------------------------------------------------------- 1 | Shader "GUI/3D Text Shader" { 2 | Properties { 3 | _MainTex ("Font Texture", 2D) = "white" {} 4 | _Color ("Text Color", Color) = (1,1,1,1) 5 | } 6 | 7 | SubShader { 8 | 9 | Tags { 10 | "Queue"="Transparent" 11 | "IgnoreProjector"="True" 12 | "RenderType"="Transparent" 13 | "PreviewType"="Plane" 14 | } 15 | Lighting Off Cull Off ZWrite Off Fog { Mode Off } 16 | Blend SrcAlpha OneMinusSrcAlpha 17 | 18 | Pass { 19 | CGPROGRAM 20 | #pragma vertex vert 21 | #pragma fragment frag 22 | 23 | #include "UnityCG.cginc" 24 | 25 | struct appdata_t { 26 | float4 vertex : POSITION; 27 | fixed4 color : COLOR; 28 | float2 texcoord : TEXCOORD0; 29 | }; 30 | 31 | struct v2f { 32 | float4 vertex : POSITION; 33 | fixed4 color : COLOR; 34 | float2 texcoord : TEXCOORD0; 35 | }; 36 | 37 | sampler2D _MainTex; 38 | uniform float4 _MainTex_ST; 39 | uniform fixed4 _Color; 40 | 41 | v2f vert (appdata_t v) 42 | { 43 | v2f o; 44 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 45 | o.color = v.color * _Color; 46 | o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); 47 | return o; 48 | } 49 | 50 | fixed4 frag (v2f i) : COLOR 51 | { 52 | fixed4 col = i.color; 53 | 54 | col.a *= tex2D(_MainTex, i.texcoord).a; 55 | 56 | return col; 57 | } 58 | ENDCG 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/3DText.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a449386ab48a3f4428e96cd322b89e84 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/UnlitAlphaColored.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Alpha Colored" { 2 | Properties { 3 | _Color ("Color Tint", Color) = (1,1,1,1) 4 | _MainTex ("Base (RGB) Alpha (A)", 2D) = "white" 5 | } 6 | 7 | Category { 8 | Lighting Off 9 | Blend SrcAlpha OneMinusSrcAlpha 10 | Tags {Queue=Transparent} 11 | 12 | SubShader { 13 | Pass { 14 | SetTexture [_MainTex] { 15 | ConstantColor [_Color] 16 | Combine Texture * constant 17 | } 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/UnlitAlphaColored.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8749b9e042c9f47eabbd07f2c4078a78 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/UnlitClipped.shader: -------------------------------------------------------------------------------- 1 | Shader "GUI/Alpha Sliced" { 2 | Properties { 3 | _MainTex ("Texture", 2D) = "white" {} 4 | _ClipRect ( "Clipping", Vector ) = ( 0, 0, 0, 0 ) 5 | _Color ("Color", Color ) = (1,1,1,1) 6 | } 7 | 8 | SubShader { 9 | Tags { 10 | "RenderType"="Transparent" 11 | "Queue"="Transparent" 12 | "IgnoreProjector"="True" 13 | } 14 | 15 | LOD 200 16 | Lighting Off 17 | Blend SrcAlpha OneMinusSrcAlpha 18 | 19 | Pass { 20 | CGPROGRAM 21 | #pragma exclude_renderers d3d11 xbox360 22 | #pragma vertex vert 23 | #pragma fragment frag 24 | #include "UnityCG.cginc" 25 | 26 | struct v2f { 27 | float4 pos : SV_POSITION; 28 | float2 uv_MainTex : TEXCOORD0; 29 | float3 wpos; 30 | }; 31 | 32 | float4 _MainTex_ST; 33 | float4 _ClipRect; 34 | float4 _Color; 35 | 36 | v2f vert(appdata_base v) { 37 | v2f o; 38 | o.pos = mul(UNITY_MATRIX_MVP, v.vertex); 39 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 40 | o.wpos = mul(_Object2World, v.vertex); 41 | return o; 42 | } 43 | 44 | sampler2D _MainTex; 45 | 46 | float4 frag(v2f IN) : COLOR { 47 | if ( (IN.wpos.x<_ClipRect.x) || (IN.wpos.x>_ClipRect.y) || (IN.wpos.y<_ClipRect.z) || (IN.wpos.y>_ClipRect.w) ) { 48 | half4 colorTransparent = half4(0,0,0,0); 49 | return colorTransparent; 50 | } else { 51 | half4 c = tex2D (_MainTex, IN.uv_MainTex); 52 | return c; 53 | } 54 | } 55 | ENDCG 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/UnlitClipped.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2263483c679e54c5db24e83c9f7f0de8 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/UnlitVertexColored.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Vertex Colored" { 2 | Properties { 3 | _MainTex ("Texture", 2D) = "white" {} 4 | } 5 | 6 | Category { 7 | Lighting Off 8 | Blend SrcAlpha OneMinusSrcAlpha 9 | Tags { "Queue"="Geometry" } 10 | 11 | BindChannels { 12 | Bind "Color", color 13 | Bind "Vertex", vertex 14 | Bind "TexCoord", texcoord 15 | } 16 | 17 | SubShader { 18 | Pass { 19 | SetTexture [_MainTex] { 20 | Combine Texture * primary 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Shaders/UnlitVertexColored.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1abe4c68534b4ac40bd2a8b100d67909 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Skins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 283728514dec2dd44af69c2d75d03c81 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Skins/OGDefault.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58fd61f2959049e4fb5b991de23555c8 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Skins/OGDefault/OGDefault.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: OGDefault 10 | m_Shader: {fileID: 4800000, guid: 1abe4c68534b4ac40bd2a8b100d67909, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 2800000, guid: 74f2aaec8572f2841b69fdbc56b35948, type: 3} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | data: 31 | first: 32 | name: _DecalTex 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | m_Floats: 38 | data: 39 | first: 40 | name: _Cutoff 41 | second: .5 42 | data: 43 | first: 44 | name: _Shininess 45 | second: .699999988 46 | m_Colors: 47 | data: 48 | first: 49 | name: _Color 50 | second: {r: 1, g: 1, b: 1, a: 1} 51 | data: 52 | first: 53 | name: _SpecColor 54 | second: {r: 1, g: 1, b: 1, a: 0} 55 | data: 56 | first: 57 | name: _ClipRect 58 | second: {r: 0, g: 1, b: 0, a: 1} 59 | data: 60 | first: 61 | name: _Emission 62 | second: {r: .625, g: .500919104, b: .500919104, a: 0} 63 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Skins/OGDefault/OGDefault.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 957597abf8ef93842b28dbbdb43f6ab1 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Skins/OGDefault/OGDefault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/Assets/Plugins/OpenGUI/Skins/OGDefault/OGDefault.png -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Skins/OGDefault/OGDefault.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74f2aaec8572f2841b69fdbc56b35948 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 1 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 0 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | spriteMeshType: 1 36 | alignment: 0 37 | spritePivot: {x: .5, y: .5} 38 | spritePixelsToUnits: 100 39 | alphaIsTransparency: 1 40 | textureType: 2 41 | buildTargetSettings: [] 42 | spriteSheet: 43 | sprites: [] 44 | spritePackingTag: 45 | userData: 46 | -------------------------------------------------------------------------------- /OpenEd/Assets/Plugins/OpenGUI/Skins/OGDefault/OGDefault.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bf9c433c0384814abaf6c6e472bfbd1 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /OpenEd/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-open-tools/opened/79b539d7f6c3a9f34431970ab50ca06a5854127b/OpenEd/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notice 2 | This project is unmaintained, but feel free to fork it. 3 | 4 | ![](https://raw.githubusercontent.com/mrzapp/opened/master/Images/logo.png) 5 | 6 | ### What? 7 | This is a plugin for building level editors for Unity games. It lends a few design choices from the Unity editor itself, but has some more tricks up its sleeve. I am developing this in tandem with my Deus Ex-based game project [The Vongott Chronicles](http://jeppezapp.com/vongott/) 8 | 9 | ### Why? 10 | If for whatever reason you'd want to include a level editor in your game, this is a good place to start. OpenEd at its default configuration is very reminiscent of the Unity editor, but because it's using OpenGUI, you can make it look and behave any way you want. 11 | 12 | ### Documentation and tutorials 13 | In the [wiki](https://github.com/mrzapp/opened/wiki) 14 | 15 | ### Screenshots 16 | Faded grid 17 | ![](https://raw.githubusercontent.com/mrzapp/opened/master/Images/home.jpg) 18 | 19 | Full nested object serialization 20 | ![](https://raw.githubusercontent.com/mrzapp/opened/master/Images/map.jpg) 21 | 22 | Prefab browser 23 | ![](https://raw.githubusercontent.com/mrzapp/opened/master/Images/prefabs.jpg) 24 | 25 | File browser 26 | ![](https://raw.githubusercontent.com/mrzapp/opened/master/Images/open.jpg) 27 | 28 | Custom inspectors 29 | ![](https://raw.githubusercontent.com/mrzapp/opened/master/Images/inspectors.jpg) 30 | 31 | Asset linking via either compiled resource or custom zip-based asset bundle 32 | ![](https://raw.githubusercontent.com/mrzapp/opened/master/Images/audiosource.jpg) 33 | 34 | ### License 35 | MIT 36 | --------------------------------------------------------------------------------