|
|
|
|
|
|
/// <see cref="InputActionActuator"/>s.
|
|
|
|
/// </summary>
|
|
|
|
[RequireComponent(typeof(PlayerInput), typeof(IInputActionAssetProvider))] |
|
|
|
[AddComponentMenu("ML Agents/Input Actuator", (int)MenuGroup.Actuators)] |
|
|
|
public class InputActuatorComponent : ActuatorComponent |
|
|
|
{ |
|
|
|
InputActionAsset m_InputAsset; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var inputControlScheme = new InputControlScheme( |
|
|
|
mlAgentsControlSchemeName, |
|
|
|
mlAgentsControlSchemeName, |
|
|
|
deviceRequirements); |
|
|
|
|
|
|
|
return inputControlScheme; |
|
|
|
|
|
|
var builder = new InputControlLayout.Builder() |
|
|
|
.WithName(layoutName) |
|
|
|
.WithFormat(mlAgentsLayoutFormat); |
|
|
|
for(var i = 0; i < defaultMap.actions.Count; i++) |
|
|
|
for (var i = 0; i < defaultMap.actions.Count; i++) |
|
|
|
{ |
|
|
|
var action = defaultMap.actions[i]; |
|
|
|
builder.AddControl(action.name) |
|
|
|
|
|
|
|
|
|
|
}, layoutName); |
|
|
|
} |
|
|
|
} |
|
|
|