From 6e18bbd6191f96340ce34318af91b1b8cdfe1c24 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 19 Sep 2014 16:58:51 +0100 Subject: [PATCH] Added Camera & Sprite menu items --- .../Fungus/Camera/Editor/CameraMenuItems.cs | 27 ++++++++++++++++ .../Camera/Editor/CameraMenuItems.cs.meta | 8 +++++ Assets/Fungus/Sprite/Editor.meta | 5 +++ .../Fungus/Sprite/Editor/SpriteMenuItems.cs | 29 ++++++++++++++++++ .../Sprite/Editor/SpriteMenuItems.cs.meta | 8 +++++ .../Fungus/Sprite/Prefabs/Background.prefab | Bin 11808 -> 0 bytes .../Sprite/Prefabs/Background.prefab.meta | 4 --- 7 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 Assets/Fungus/Camera/Editor/CameraMenuItems.cs create mode 100644 Assets/Fungus/Camera/Editor/CameraMenuItems.cs.meta create mode 100644 Assets/Fungus/Sprite/Editor.meta create mode 100644 Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs create mode 100644 Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs.meta delete mode 100644 Assets/Fungus/Sprite/Prefabs/Background.prefab delete mode 100644 Assets/Fungus/Sprite/Prefabs/Background.prefab.meta diff --git a/Assets/Fungus/Camera/Editor/CameraMenuItems.cs b/Assets/Fungus/Camera/Editor/CameraMenuItems.cs new file mode 100644 index 00000000..51f7c15d --- /dev/null +++ b/Assets/Fungus/Camera/Editor/CameraMenuItems.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace Fungus +{ + + public class CameraMenuItems + { + [MenuItem("GameObject/Fungus/Camera/View")] + static void CreateBackground() + { + InstantiatePrefab("View"); + } + + static void InstantiatePrefab(string prefabName) + { + GameObject prefab = Resources.LoadAssetAtPath("Assets/Fungus/Camera/Prefabs/" + prefabName + ".prefab", typeof(GameObject)) as GameObject; + if (prefab != null) + { + GameObject go = GameObject.Instantiate(prefab) as GameObject; + go.name = prefabName; + } + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Camera/Editor/CameraMenuItems.cs.meta b/Assets/Fungus/Camera/Editor/CameraMenuItems.cs.meta new file mode 100644 index 00000000..0e7bde7c --- /dev/null +++ b/Assets/Fungus/Camera/Editor/CameraMenuItems.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51343e36134df4735b2d56529127c93d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Sprite/Editor.meta b/Assets/Fungus/Sprite/Editor.meta new file mode 100644 index 00000000..535871f9 --- /dev/null +++ b/Assets/Fungus/Sprite/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6de313ae80cb3443ab384d5491b0839c +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs b/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs new file mode 100644 index 00000000..66a2710b --- /dev/null +++ b/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs @@ -0,0 +1,29 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace Fungus +{ + + public class SpriteMenuItems + { + + [MenuItem("GameObject/Fungus/Sprite/ParallaxSprite")] + static void CreateBackground() + { + InstantiatePrefab("ParallaxSprite"); + } + + static void InstantiatePrefab(string prefabName) + { + GameObject prefab = Resources.LoadAssetAtPath("Assets/Fungus/Sprite/Prefabs/" + prefabName + ".prefab", typeof(GameObject)) as GameObject; + if (prefab != null) + { + GameObject go = GameObject.Instantiate(prefab) as GameObject; + go.name = prefabName; + } + } + + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs.meta b/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs.meta new file mode 100644 index 00000000..ac7299c0 --- /dev/null +++ b/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06d0a1fb0d8114b0c953983b0424cc89 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Sprite/Prefabs/Background.prefab b/Assets/Fungus/Sprite/Prefabs/Background.prefab deleted file mode 100644 index 715176813e78c88e4d8b2b65befa8d16249138a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11808 zcmeHNO^h5@5q|67u;w4kZy+#sY;YVfPJqau$k|_;m9p`$KPW;-rg!G;Y~$JPQFrfT z9dg(M0tvwZi38$*q9|8TB!mQoH=mA)K}HjQ?I+%wt|onY2K>0 z`@O37s$NxfRlS;a?(9R(o$EN~jyZRBj_&S@=N>(Ge(T{2?mxF~-I}EV+*i{iUGO{6 zI8OI6w-Dvt(daGUqs`#ofphPs+g_5#gT(hcaZ$Z?R&*n)=jnedebOm6MM9@R{~dx;t%U9-?ezi?T~4B{q3<*7od$1aUOF{h zi~2%czspW5pLu&Qsr6nKj|yy0o_K38A~bM~*1EO#2#k>wv9Y!Hwjkw27AFIu_#}y! zjre^Q>!1{AmPOayJpYHGzn^eGhOfB^PkH=|XH)wC0nro*&%K=}bN#4@c=R}is9B7P z8Ij!LFv|0lK3RIa9s7*A`=HE{X$LZ0_?mF{A+zkvTnl#}wu_X{A$K2X!6@aK#c387 z*Lj;CHE66X>Wi_^JD+BL&5wPS`~KxD8tufroZ0@EowOnyti3f%d)G)AV&vi)?z6b1 zkuSu>rPvSqq_l-{%4(EfV}?Fn;=@S55TskPN}4Wff1<=?4b0AQ56Znu=LQAVmYzB{ zwP(n*#kowK+tj&TeN#F&jzOnZBZ}#9G=!G)nf+Sb(X|F4>)2*WXVnNo)}txXVmeH- zwaW|hM3$c&f{^+$ewSuD?BBMBX;iq3pF{uE!3*aEK4AF$JW{@qG#^diTMYjskF>!f zhJUIBE@E0AQ3UX8%KXG4>KJqkw2J72LDJnfM0D~{q>bw%iLVbB6sAsn%~B{)%Y8QX z^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r3Xq$`E#%} zzfE-pWbe?sjl9@Et9ERONq5=Mj;%8(Qf0Yoem5Qae)T(uSg$QOVG6Fgl5D{VaAmMk zk}WtX-C*1N6%h7nt4(&Pz!J6c0t8*Iu~!?36^Ut@@7DOMxzeYBdRTCpY$Tu_7My4n zwFdPL4^M0tU8X)MW8iFv>eFO|wSA&CQ-vAuaI%JkZi5FKn^gkU?+3E$(mw)fBXt9N zd4DvdBd>hvcG?o3D?4<9gLv+HGIx`n@r3Jn8heWFu^D@T#%|Qc4(_|xU7!iyq;YsF zTyy{Wh5IRujp!L(Eu;Gajm?r+mgpHDUt;XlSJq~_GzQZ^!4B8AmN#ZbH1-vGMnMOc z`@`nUi!}BuJ>D#@BQ$oN!ozpX*mHw_AAO0&&d?YFA1<2a+|~5Ar|XK2_l8vO4<)Vnsw=qK_% zf2id)lOh@nNaVGK`M7Mux*&N|2Wdx;02(9%386unN9m4hWj7jly2I{oM~lFXR;LFE zvUCX(QdfG=6lh_WQbN5udTsjy6KY*}mUi&?t)Ktw)y-$my{3JV>f^X{4e+Medan;) zKY+nf6^8pSU;4%$bnj~tMdzMnoyPM;zY`uRV7Z9W!&{&*+`B*d@v72+J{1Pb z$GG+tN7n)0w}V?cI@h@y3-tx>wEko+WMG?>iHtYpt~d|8eBt=(7f-tvUjFCt80+X& jXUFOOz<=24^e4~?v(&r3V-t)!KUHfSf(kpFA*BBTIKNBA diff --git a/Assets/Fungus/Sprite/Prefabs/Background.prefab.meta b/Assets/Fungus/Sprite/Prefabs/Background.prefab.meta deleted file mode 100644 index f3ac1cf1..00000000 --- a/Assets/Fungus/Sprite/Prefabs/Background.prefab.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 7dd153b86fca74c329ccf129422fdbe2 -NativeFormatImporter: - userData: