Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class ScriptOne : MonoBehaviour
- {
- // reference to the prefab/texture
- public GameObject prefab;
- // Not called since the object is disabled
- // will be called as soon as gameobject 1 gets enabled
- private void Awake()
- {
- Debug.Log("prefab: " + prefab);
- }
- }
- using UnityEngine;
- using System.Collections;
- public class ScriptTwo : MonoBehaviour
- {
- // Reference to gameobject 1
- public GameObject other;
- private void Awake()
- {
- Debug.Log("other: " + other.GetComponent<LoadOrderTest>().prefab);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement