public class Hierarchy : EditorWindow
{
public Dictionary<int, bool> foldouts = new Dictionary<int, bool>();
v...












public class Hierarchy : EditorWindow
{
public Dictionary<int, bool> foldouts = new Dictionary<int, bool>();
v...












public class Hierarchy : EditorWindow
{
public Dictionary<int, bool> foldouts = new Dictionary<int, bool>();
v...












protected override TreeViewItem BuildRoot ()
{
var root = new TreeViewItem {id = 0, depth = -1, displayName = ...




😂














[MenuItem(“ ")]
static void Open()
{
//
BuildPipeline.BuildPlayer(options);
}










class MyCustomBuildProcessor : IPreprocessBuild
{
public void OnPreprocessBuild(BuildTarget target, string path)...
[ScriptedImporter(1, "cube")]
public class CubeImporter : ScriptedImporter
{
public float m_Scale = 1;
public override voi...












[CustomEditor(typeof(CubeImporter))]
public class CubeImporterEditor : ScriptedImporterEditor
{
}












[CustomEditor(typeof(Object))]
public class ObjectEditor : Editor
{
public ObjectEditor ()
{
if (extension == ...


public class E03_StyleSheet : EditorWindow
{
public void OnEnable()
{
var root = this.GetRootVisualContainer();
root.AddSt...
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Upcoming SlideShare
Loading in …5
×

Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート

566 views

Published on

Unity夏LT大会2017で発表した資料です

Published in: Engineering
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
566
On SlideShare
0
From Embeds
0
Number of Embeds
117
Actions
Shares
0
Downloads
0
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート

  1. 1. 
 
 
 
 
 
 public class Hierarchy : EditorWindow { public Dictionary<int, bool> foldouts = new Dictionary<int, bool>(); void OnGUI() { var id = 1; foldouts[id] = EditorGUILayout.Foldout(foldouts[id], "Parent"); if (foldouts[id]) { EditorGUI.indentLevel = 2; EditorGUILayout.LabelField("Child"); } } }
  2. 2. 
 
 
 
 
 
 public class Hierarchy : EditorWindow { public Dictionary<int, bool> foldouts = new Dictionary<int, bool>(); void OnGUI() { var id = 1; foldouts[id] = EditorGUILayout.Foldout(foldouts[id], "Parent"); if (foldouts[id]) { EditorGUI.indentLevel = 2; EditorGUILayout.LabelField("Child"); } } }
  3. 3. 
 
 
 
 
 
 public class Hierarchy : EditorWindow { public Dictionary<int, bool> foldouts = new Dictionary<int, bool>(); void OnGUI() { var id = 1; foldouts[id] = EditorGUILayout.Foldout(foldouts[id], "Parent"); if (foldouts[id]) { EditorGUI.indentLevel = 2; EditorGUILayout.LabelField("Child"); } } }
  4. 4. 
 
 
 
 
 
 protected override TreeViewItem BuildRoot () { var root = new TreeViewItem {id = 0, depth = -1, displayName = "Root"}; var allItems = new List<TreeViewItem> { new TreeViewItem {id = 1, depth = 0, displayName = "Animals"}, new TreeViewItem {id = 2, depth = 1, displayName = "Mammals"}, new TreeViewItem {id = 3, depth = 2, displayName = "Tiger"}, new TreeViewItem {id = 7, depth = 1, displayName = "Reptiles"}, new TreeViewItem {id = 8, depth = 2, displayName = "Crocodile"}, new TreeViewItem {id = 9, depth = 2, displayName = "Lizard"}, }; return root; }
  5. 5. 
 

  6. 6. 😂
  7. 7. 
 
 

  8. 8. 
 
 
 
 [MenuItem(“ ")] static void Open() { // BuildPipeline.BuildPlayer(options); }
  9. 9. 
 
 
 
 
 class MyCustomBuildProcessor : IPreprocessBuild { public void OnPreprocessBuild(BuildTarget target, string path) { Debug.Log(“ ”); } }
  10. 10. [ScriptedImporter(1, "cube")] public class CubeImporter : ScriptedImporter { public float m_Scale = 1; public override void OnImportAsset(AssetImportContext ctx) { var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); var text = File.ReadAllText(ctx.assetPath); var position = JsonUtility.FromJson<Vector3>(text); cube.transform.position = position; } }
  11. 11. 
 
 
 
 
 
 [CustomEditor(typeof(CubeImporter))] public class CubeImporterEditor : ScriptedImporterEditor { }
  12. 12. 
 
 
 
 
 
 [CustomEditor(typeof(Object))] public class ObjectEditor : Editor { public ObjectEditor () { if (extension == ".zip") { editor = Editor.CreateEditor (Selection.activeObject, typeof(ZipEditor)); } else if (string.IsNullOrEmpty (extension)) { editor = Editor.CreateEditor (Selection.activeObject, typeof(FolderEditor)); } else { editor = null; } }
  13. 13.
  14. 14. public class E03_StyleSheet : EditorWindow { public void OnEnable() { var root = this.GetRootVisualContainer(); root.AddStyleSheetPath("styles"); // Here we just take all layout properties and other to extract them in USS! var boxes = new VisualContainer() { name = "boxesContainer" }; boxes.AddToClassList("horizontalContainer"); root.Add(boxes); }

×
Save this presentationTap To Close