public static GameObject TurnIntoReplicator(MenuCommand command) { MARSSession.EnsureRuntimeState(); EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs { label = k_TurnIntoReplicator }); var go = TurnIntoInContext(command, k_ReplicatorLabel, typeof(Replicator)); return(RegisterUndoAndSelect(go, "Turned into Replicator")); }
public static GameObject CreateRulesetObject(MenuCommand command) { MARSSession.EnsureRuntimeState(); EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs { label = k_CreateRulesetObjectLabel }); var go = CreateInContext(command, k_RuleSetLabel, new Type[] { typeof(Rules.ProxyRuleSet) }); return(RegisterUndoAndSelect(go, "Create Rule Set")); }
public static GameObject TurnIntoProxyObject(MenuCommand command) { MARSSession.EnsureRuntimeState(); EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs { label = k_TurnIntoProxy }); var go = TurnIntoInContext(command, k_ProxyLabel, k_ProxyObjectBaseComponents); return(RegisterUndoAndSelect(go, "Turned into Proxy")); }
public static GameObject TurnIntoProxyPlane(MenuCommand command) { MARSSession.EnsureRuntimeState(); EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs { label = k_TurnIntoProxyPlane }); var types = k_ProxyObjectBaseComponents.ToList(); types.Add(typeof(PlaneSizeCondition)); types.Add(typeof(AlignmentCondition)); var go = TurnIntoInContext(command, k_ProxyLabel, types.ToArray()); go.GetComponent <PlaneSizeCondition>().maxBounded = false; return(RegisterUndoAndSelect(go, "Turned into Proxy Plane")); }
public static GameObject CreateMARSSessionObject(MenuCommand command) { MARSSession.EnsureRuntimeState(); return(MARSSession.Instance.gameObject); }