Question: In a Unity scene, I define four objects: Obj-A, Obj-B, Obj-C, and Obj-D. Each has the following corresponding script: public class ObjAScript : MonoBehaviour

In a Unity scene, I define four objects: Obj-A, Obj-B, Obj-C, and Obj-D. Each has the following corresponding Question 1 How many GameObjects will there be? Question 2 How many instances of ObjAScript will there be? Question 4 How many instances of ObjBScript will there be? Question 5 The instances of ObjBScript are The instances of ObjCScript are components of Obj-A Obj-B Obj-C Obj-D None of the above Question 8 How many

In a Unity scene, I define four objects: Obj-A, Obj-B, Obj-C, and Obj-D. Each has the following corresponding script: public class ObjAScript : MonoBehaviour { GameObject obj; ObjDScript scpt; void Start() { } } obj = GameObject. Find("Obj-D"); obj.AddComponent (); } public class ObjBScript : MonoBehaviour { GameObject obj; ObjCScript scpt; void Start() { scpt = obj.GetComponent (); } obj = GameObject.CreatePrimitive (PrimitiveType.Sphere); obj. AddComponent (); scpt = GameObject. Find("Obj-C"). GetComponent (); Destroy(gameObject. GetComponent ()); // this deletes a component } public class ObjCScript : MonoBehaviour { void Start() { gameObject.AddComponent (); GameObject.CreatePrimitive(PrimitiveType.Sphere); } public class pbjDScript: MonoBehaviour { void Update() { transform. localPosition += Vector3.right * 0.1f; } Please answer the following questions based on the running of this scene. Question 1 How many GameObjects will there be? 3 pts Question 1 How many GameObjects will there be? Question 2 How many instances of ObjAScript will there be? Question 3 The instances of ObjAScript are components of Obj-A Obj-B Obj-C Obj-D None of the above Question 4 How many instances of ObjBScript will there be? Question 5 The instances of ObjBScript are components of Obj-A Obj-B Obj-C Obj-D None of the above Question 6 How many instances of ObjCScript will there be? The instances of ObjCScript are components of Obj-A Obj-B Obj-C Obj-D None of the above Question 8 How many instances of ObjDScript will there be? Question 9 The instances of ObjDScript are components of obj-A obj-B obj-C obj-D None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the given Unity scripts and the scene setup lets answer each question one by one Question 1 How many Game Objects will there be ObjA creates ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!