What i want is to forward gob3dModel from this Scene to ImageTargets Scene so i didn't destroy the object and received it Normally ,,, but i want it instead of the TeaPot in image target not like spalsh static pic on the screen i want it to be augmented on the Target !
the Sender Scene ,,,,,
public class SceneOne : MonoBehaviour {
public GameObject gob3dModel;
void Start () {
loadScene();
}
void Update () {
}
void loadScene(){
Application.LoadLevel("QCAR-ImageTargets");
DontDestroyOnLoad(gob3dModel);
}}
the receiver Scene ,,,,
public class QCARAssign : MonoBehaviour {
SceneOne sce1;
public GameObject guiTe;
void Start () {
GameObject gob= GameObject.Find("gob3dModel");
sce1=gob.GetComponent<SceneOne>();
guiTe = gob;
Destroy(gob);
}
// Update is called once per frame
void Update () {
}
}
try guiTe.transform.parent = ImageTargetName.transform - this will make the model a child of the ImageTarget instance. You can also do this in the event handler using mTrackableBehaviour.gameObject.tranform.