SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline












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");
}
}
}












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");
}
}
}












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");
}
}
}












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;
}




😂














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










class MyCustomBuildProcessor : IPreprocessBuild
{
public void OnPreprocessBuild(BuildTarget target, string path)
{
Debug.Log(“ ”);
}
}
[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;
}
}












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












[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;
}
}


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);
}
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート

Mais conteúdo relacionado

Mais de Keigo Ando

Unityでアプリを作るには
Unityでアプリを作るにはUnityでアプリを作るには
Unityでアプリを作るには
Keigo Ando
 
Unity2DとNewGUIについて
Unity2DとNewGUIについてUnity2DとNewGUIについて
Unity2DとNewGUIについて
Keigo Ando
 
基本&ヒント
基本&ヒント基本&ヒント
基本&ヒント
Keigo Ando
 
基本答え&解説のみ
基本答え&解説のみ基本答え&解説のみ
基本答え&解説のみ
Keigo Ando
 
Editor10-提出方法
Editor10-提出方法Editor10-提出方法
Editor10-提出方法
Keigo Ando
 
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
Keigo Ando
 
エディタ拡張勉強会第0回
エディタ拡張勉強会第0回エディタ拡張勉強会第0回
エディタ拡張勉強会第0回
Keigo Ando
 
Unity3.5と4.0の違い
Unity3.5と4.0の違いUnity3.5と4.0の違い
Unity3.5と4.0の違い
Keigo Ando
 
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
Keigo Ando
 
Unity games uplaod
Unity games uplaodUnity games uplaod
Unity games uplaod
Keigo Ando
 

Mais de Keigo Ando (19)

Unity5.3の機能まとめ
Unity5.3の機能まとめUnity5.3の機能まとめ
Unity5.3の機能まとめ
 
Unibook4執筆ガイドライン
Unibook4執筆ガイドラインUnibook4執筆ガイドライン
Unibook4執筆ガイドライン
 
わたしのVisual studio環境
わたしのVisual studio環境わたしのVisual studio環境
わたしのVisual studio環境
 
Unibook3執筆ガイドライン
Unibook3執筆ガイドラインUnibook3執筆ガイドライン
Unibook3執筆ガイドライン
 
UNIBOOK2執筆ガイドライン
UNIBOOK2執筆ガイドラインUNIBOOK2執筆ガイドライン
UNIBOOK2執筆ガイドライン
 
Unityでアプリを作るには
Unityでアプリを作るにはUnityでアプリを作るには
Unityでアプリを作るには
 
Unity2DとNewGUIについて
Unity2DとNewGUIについてUnity2DとNewGUIについて
Unity2DとNewGUIについて
 
基本&ヒント
基本&ヒント基本&ヒント
基本&ヒント
 
基本答え&解説のみ
基本答え&解説のみ基本答え&解説のみ
基本答え&解説のみ
 
応用のみ
応用のみ応用のみ
応用のみ
 
Editor10-提出方法
Editor10-提出方法Editor10-提出方法
Editor10-提出方法
 
Unity Networkとの違い
Unity Networkとの違いUnity Networkとの違い
Unity Networkとの違い
 
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
 
Editor スクリプティング 入門
Editor スクリプティング 入門Editor スクリプティング 入門
Editor スクリプティング 入門
 
エディタ拡張勉強会第0回
エディタ拡張勉強会第0回エディタ拡張勉強会第0回
エディタ拡張勉強会第0回
 
Unity3.5と4.0の違い
Unity3.5と4.0の違いUnity3.5と4.0の違い
Unity3.5と4.0の違い
 
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
 
Asset server(管理者編)
Asset server(管理者編)Asset server(管理者編)
Asset server(管理者編)
 
Unity games uplaod
Unity games uplaodUnity games uplaod
Unity games uplaod
 

Último

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Último (20)

(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 

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

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. 
 
 
 
 
 
 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"); } } }
  • 9. 
 
 
 
 
 
 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"); } } }
  • 10. 
 
 
 
 
 
 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"); } } }
  • 11. 
 
 
 
 
 
 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; }
  • 13.
  • 14.
  • 15. 😂
  • 16.
  • 18.
  • 19. 
 
 
 
 [MenuItem(“ ")] static void Open() { // BuildPipeline.BuildPlayer(options); }
  • 20. 
 
 
 
 
 class MyCustomBuildProcessor : IPreprocessBuild { public void OnPreprocessBuild(BuildTarget target, string path) { Debug.Log(“ ”); } }
  • 21.
  • 22. [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; } }
  • 24. 
 
 
 
 
 
 [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; } }
  • 25.
  • 26. 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); }