Browse Source

Spawn narrative prefabs at 0,0,0 by default #106

master
chrisgregan 10 years ago
parent
commit
1de742cbb4
  1. 3
      Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs
  2. 21
      Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs

3
Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs

@ -11,7 +11,8 @@ namespace Fungus
[MenuItem("Tools/Fungus/Create/Flowchart", false, 0)] [MenuItem("Tools/Fungus/Create/Flowchart", false, 0)]
static void CreateFlowchart() static void CreateFlowchart()
{ {
SpawnPrefab("Flowchart"); GameObject go = SpawnPrefab("Flowchart");
go.transform.position = Vector3.zero;
} }
public static GameObject SpawnPrefab(string prefabName) public static GameObject SpawnPrefab(string prefabName)

21
Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs

@ -12,37 +12,43 @@ namespace Fungus
[MenuItem("Tools/Fungus/Create/Character", false, 50)] [MenuItem("Tools/Fungus/Create/Character", false, 50)]
static void CreateCharacter() static void CreateCharacter()
{ {
FlowchartMenuItems.SpawnPrefab("Character"); GameObject go = FlowchartMenuItems.SpawnPrefab("Character");
go.transform.position = Vector3.zero;
} }
[MenuItem("Tools/Fungus/Create/Say Dialog", false, 51)] [MenuItem("Tools/Fungus/Create/Say Dialog", false, 51)]
static void CreateSayDialog() static void CreateSayDialog()
{ {
FlowchartMenuItems.SpawnPrefab("SayDialog"); GameObject go = FlowchartMenuItems.SpawnPrefab("SayDialog");
go.transform.position = Vector3.zero;
} }
[MenuItem("Tools/Fungus/Create/Menu Dialog", false, 52)] [MenuItem("Tools/Fungus/Create/Menu Dialog", false, 52)]
static void CreateMenuDialog() static void CreateMenuDialog()
{ {
FlowchartMenuItems.SpawnPrefab("MenuDialog"); GameObject go = FlowchartMenuItems.SpawnPrefab("MenuDialog");
go.transform.position = Vector3.zero;
} }
[MenuItem("Tools/Fungus/Create/Tag", false, 53)] [MenuItem("Tools/Fungus/Create/Tag", false, 53)]
static void CreateTag() static void CreateTag()
{ {
FlowchartMenuItems.SpawnPrefab("Tag"); GameObject go = FlowchartMenuItems.SpawnPrefab("Tag");
go.transform.position = Vector3.zero;
} }
[MenuItem("Tools/Fungus/Create/Audio Tag", false, 54)] [MenuItem("Tools/Fungus/Create/Audio Tag", false, 54)]
static void CreateAudioTag() static void CreateAudioTag()
{ {
FlowchartMenuItems.SpawnPrefab("AudioTag"); GameObject go = FlowchartMenuItems.SpawnPrefab("AudioTag");
go.transform.position = Vector3.zero;
} }
[MenuItem("Tools/Fungus/Create/Stage", false, 55)] [MenuItem("Tools/Fungus/Create/Stage", false, 55)]
static void CreateStage() static void CreateStage()
{ {
FlowchartMenuItems.SpawnPrefab("Stage"); GameObject go = FlowchartMenuItems.SpawnPrefab("Stage");
go.transform.position = Vector3.zero;
} }
[MenuItem("Tools/Fungus/Create/Stage Position", false, 56)] [MenuItem("Tools/Fungus/Create/Stage Position", false, 56)]
@ -54,7 +60,8 @@ namespace Fungus
[MenuItem("Tools/Fungus/Create/Localization", false, 57)] [MenuItem("Tools/Fungus/Create/Localization", false, 57)]
static void CreateLocalization() static void CreateLocalization()
{ {
FlowchartMenuItems.SpawnPrefab("Localization"); GameObject go = FlowchartMenuItems.SpawnPrefab("Localization");
go.transform.position = Vector3.zero;
} }
} }

Loading…
Cancel
Save