- Home /
Return a Exist GameObject
Hi! I have a DLL to save and load a GameObject, I use a script in Unity to get this GameObject. In the DLL I do;
gameObject go;
public GameObject Load () {
...
return go;
}
And in Unity I have
GameObject Player;
Player = GameObject.FindGameObjectWithTag("Player");
public void LoadXML()
{
Jugador = usedll.Load();
}
How can I make sure that a new gameObject is not created and that when using the Load function make the Player be edited?
If the gameobject has separate properties, then you'll have to add them onto your player to edit it. If you just wanted the mesh, you can set the mesh of your player to the loaded gameobject, which doesnt create a new one, but only edits the player
Your answer
Follow this Question
Related Questions
Pass a GameObject to a DLL 2 Answers
Spawn an object with additional parameter 1 Answer
Unity 3D: How to make the gameobject speed increase continuously on tapping quickly? 1 Answer
Script wont let me drag and drop GameObject Of UI Menu into it? 1 Answer
How to make an object invisible before it is triggered to show? 2 Answers