chrisgregan
10 years ago
7 changed files with 77 additions and 4 deletions
@ -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; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 51343e36134df4735b2d56529127c93d |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 6de313ae80cb3443ab384d5491b0839c |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
userData: |
@ -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; |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 06d0a1fb0d8114b0c953983b0424cc89 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
Binary file not shown.
Loading…
Reference in new issue