Game Development Reference
In-Depth Information
14. You can also click on the robot_AI_ragdoll game object in the Hierarchy view and go
to the Inspector view, and then click on the Apply buton to update the prefab, as
shown in the following screenshot:
15. As we have already updated the robot_AI_ragdoll prefab in the Project view, we
don't need the robot_AI_ragdoll game object in the Hierarchy view anymore, so
we just delete it by right-clicking on it and choosing Delete .
16. Now, we need to go back to the AIController script to enable the robot_AI_
ragdoll game object when the AI is dead. Let's open the AIController script
and add this script at the beginning, as highlighted in the following code:
@script RequireComponent(CharacterController)
//Ragdoll
public var aiRagdoll : GameObject;
//Waypoint
public var wayPoint : Waypoints;
 
Search WWH ::




Custom Search