Search Unity

Object Spawn resetting

Discussion in 'Multiplayer' started by MarxentAnthony, Jul 27, 2015.

  1. MarxentAnthony

    MarxentAnthony

    Joined:
    Feb 20, 2015
    Posts:
    18
    I am on 5.1.1p3

    Every time I try to spawn an object I have found a that the objects only spawn at (0,0,0)

    Code (csharp):
    1.  
    2. Vector3 startPos = newVector3 (0, 0, 5.0f);
    3. GameObject product = (GameObject)Instantiate (productTemplate, startPos, Quaternion.identity);
    4. product.GetComponent<NetworkProduct> ().meshAsset = data;
    5. NetworkServer.Spawn (product);
    6.  
    The new object appears at (0,0,0) but has transform (0,0,5)


    UPDATE- NEVER MIND IT WAS PROGRAMMER ERROR
     
    Last edited: Jul 27, 2015