private void AddDefaultPlayerControlsToPlayerBrain() { string controlsUri = BehaviorSystem.IdToBuiltinBehaviorUri("Player Controls"); Behaviors.PropertyAssignment speedProp = new Behaviors.PropertyAssignment { propertyName = "Speed", valueJson = "{\"value\":5}" }; if (!behaviors.HasBrain("Player")) { behaviors.PutBrain("Player", new Behaviors.Brain()); } var playerBrain = behaviors.GetBrain("Player"); playerBrain.AddUse(new Behaviors.BehaviorUse { id = behaviors.GenerateUniqueId(), behaviorUri = controlsUri, propertyAssignments = new Behaviors.PropertyAssignment[] { speedProp } }); if (!behaviors.HasBrain("e04de2718a594fc0afd2cb55bd4fa8dc")) { behaviors.PutBrain("e04de2718a594fc0afd2cb55bd4fa8dc", new Behaviors.Brain()); } var playerInstBrain = behaviors.GetBrain("e04de2718a594fc0afd2cb55bd4fa8dc"); playerInstBrain.AddUse(new Behaviors.BehaviorUse { id = behaviors.GenerateUniqueId(), behaviorUri = controlsUri, propertyAssignments = new Behaviors.PropertyAssignment[] { speedProp } }); }