1. Code:
    string chest = "LootCache";
    Vector3 randposition = session.WorldPlayerEntity.transform.position;
    RaycastHit hitInfo;
    if (Physics.Raycast(randposition, Vector3.down, out hitInfo))
    {
    Quaternion rotation = Quaternion.Euler(0.0f, (float)UnityEngine.Random.Range(0f, 360f), 0.0f);
    rotation = Quaternion.FromToRotation(Vector3.down, hitInfo.normal) * rotation;
    if(!hitInfo.collider.gameObject.name.Contains("UV") && !hitInfo.collider.gameObject.name.Contains("Cliff") && !hitInfo.collider.gameObject.name.Contains("Zone") && !hitInfo.collider.gameObject.name.Contains("Cube") && !hitInfo.collider.gameObject.name.Contains("Build"))
    {
    GameObject Obj = Singleton<HNetworkManager>.Instance.NetInstantiate(chest, hitInfo.point, Quaternion.identity, GameManager.GetSceneTime());
    Inventory inv = Obj.GetComponent<Inventory>() as Inventory;
    uLink.NetworkView nwv = uLink.NetworkView.Get(Obj);
    Puts(inv.GetDefaultCapacity().ToString());
    }
    }
    i want change the inventory size,please help me.
     
  2. You were so close!
    you want inv.StartingFreeSlots = 10; (Int)
    Code:
    string chest = "LootCache";
    Vector3 randposition = session.WorldPlayerEntity.transform.position;
    RaycastHit hitInfo;
    if (Physics.Raycast(randposition, Vector3.down, out hitInfo))
    {
        Quaternion rotation = Quaternion.Euler(0.0f, (float)UnityEngine.Random.Range(0f, 360f), 0.0f);
        rotation = Quaternion.FromToRotation(Vector3.down, hitInfo.normal) * rotation;
        if(!hitInfo.collider.gameObject.name.Contains("UV") && !hitInfo.collider.gameObject.name.Contains("Cliff") && !hitInfo.collider.gameObject.name.Contains("Zone") && !hitInfo.collider.gameObject.name.Contains("Cube") && !hitInfo.collider.gameObject.name.Contains("Build"))
        {
            GameObject Obj = Singleton<HNetworkManager>.Instance.NetInstantiate(chest, hitInfo.point, Quaternion.identity, GameManager.GetSceneTime());
            Inventory inv = Obj.GetComponent<Inventory>() as Inventory;
            uLink.NetworkView nwv = uLink.NetworkView.Get(Obj);
            inv.StartingFreeSlots = 10;
            Puts(inv.GetDefaultCapacity().ToString());
        }
    }
    
     
  3. i have add the inv.StartingFreeSlots = 10; , but this not working.
    spawn "LootCache"Inventory Number just only 1
    [DOUBLEPOST=1477968315][/DOUBLEPOST]
    is working,just inv.Capacity=10 ;