Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class ScriptOne : MonoBehaviour
  5. {
  6. // reference to the prefab/texture
  7. public GameObject prefab;
  8.  
  9. // Not called since the object is disabled
  10. // will be called as soon as gameobject 1 gets enabled
  11. private void Awake()
  12. {
  13. Debug.Log("prefab: " + prefab);
  14. }
  15. }
  16.  
  17. using UnityEngine;
  18. using System.Collections;
  19.  
  20. public class ScriptTwo : MonoBehaviour
  21. {
  22. // Reference to gameobject 1
  23. public GameObject other;
  24.  
  25. private void Awake()
  26. {
  27. Debug.Log("other: " + other.GetComponent<LoadOrderTest>().prefab);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement