コード例 #1
0
    public BoxMesh SpawnBoxMesh(GameObject go, Vector3 halfSize)
    {
        BoxMesh mesh = go.AddComponent <BoxMesh>();

        mesh.material = defaultMaterial;
        mesh.SetHalfSize(halfSize.x, halfSize.y, halfSize.z);
        return(mesh);
    }
コード例 #2
0
    public AutoMesh SpawnMesh(IBoxShape shape)
    {
        GameObject go   = new GameObject();
        BoxMesh    mesh = go.AddComponent <BoxMesh>();

        mesh.material = defaultMaterial;
        mesh.SetHalfSize(shape.HalfSize.x, shape.HalfSize.y, shape.HalfSize.z);
        return(mesh);
    }