public static SteamVR_Input_ActionFile_Action CreateNew(string actionSet, SteamVR_ActionDirections direction, string actionType) { return(new SteamVR_Input_ActionFile_Action() { name = CreateNewName(actionSet, direction.ToString().ToLower()), type = actionType }); }
protected override void CreateUninitialized(string newActionSet, SteamVR_ActionDirections direction, string newAction, bool caseSensitive) { actionPath = SteamVR_Input_ActionFile_Action.CreateNewName(newActionSet, direction, newAction); sourceMap = new SourceMap(); sourceMap.PreInitialize(this, actionPath, false); needsReinit = true; initialized = false; }
public static string CreateNewName(string actionSet, SteamVR_ActionDirections direction, string actionName) { return(string.Format(nameTemplate, actionSet, direction.ToString().ToLower(), actionName)); }
/// <summary> /// Sets up a default action to be assigned to this field or property on action generation. Must be on a prefab or in a scene in build settings. /// </summary> /// <param name="defaultActionName">The name of the action to assign to this field/property</param> /// <param name="overrideExistingActionDuringGeneration"> /// Set to true if you want to always set this action to this field/property (even if set to something else) /// </param> /// <param name="defaultActionSetName">The name of the action set that the action to assign is a member of</param> /// <param name="defaultActionDirection">The direction of the action (input / output)</param> public SteamVR_DefaultAction(string defaultActionName, string defaultActionSetName, SteamVR_ActionDirections defaultActionDirection, bool overrideExistingActionDuringGeneration = false) { actionName = defaultActionName; actionSetName = defaultActionSetName; direction = defaultActionDirection; overrideExistingOnGeneration = overrideExistingActionDuringGeneration; }