Пример #1
0
    void Start()
    {
        trans     = gameObject.GetComponent <Transform>();
        world     = gameObject.GetComponent <MPWorld>();
        dummyMesh = new Mesh();
        meshes    = new GameObject("MPMeshes");
        gameObject.GetComponent <MeshFilter>().mesh = dummyMesh;

        meshData    = new MPMeshData();
        children    = new List <GameObject>();
        dataTexture = new RenderTexture(dataTextureWidth, dataTextureHeight, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Default);
        dataTexture.isPowerOfTwo = false;
        dataTexture.filterMode   = FilterMode.Point;
        dataTexture.Create();
        if (material)
        {
            material.SetTexture("_DataTex", dataTexture);
            material.SetFloat("_DataTexPitch", 1.0f / dataTextureWidth);
        }
    }
Пример #2
0
 [DllImport("MassParticle")] public static extern void mpGenerateCubeMesh(int context, int i, ref MPMeshData md);
Пример #3
0
 public static extern void mpGeneratePointMesh(int context, int i, ref MPMeshData md);
Пример #4
0
 [DllImport("MassParticle")] unsafe public static extern void mpGeneratePointMesh(int i, ref MPMeshData md);