Ejemplo n.º 1
0
    public void ChunkProcPostGenMesh(IVxSurfExtractReq ireq)
    {
        SurfExtractReqMC req  = ireq as SurfExtractReqMC;
        VFVoxelChunkGo   vfGo = VFVoxelChunkGo.CreateChunkGo(req);

        req._chunk.AttachChunkGo(vfGo, req);
#if !ScopedCollider
        if (vfGo != null)
        {
            bChunkColliderRebuilding = true;
            vfGo._mc.sharedMesh      = null;
            vfGo._mc.sharedMesh      = vfGo._mf.mesh;
            foreach (Transform subGo in vfGo.transform)
            {
                VFVoxelChunkGo vfGoSub = subGo.GetComponent <VFVoxelChunkGo>();
                if (vfGoSub != null)
                {
                    vfGoSub._mc.sharedMesh = null;
                    vfGoSub._mc.sharedMesh = vfGoSub._mf.mesh;
                }
            }
            bChunkColliderRebuilding = false;
        }
#endif
    }
Ejemplo n.º 2
0
    public void ChunkProcPostGenMesh(IVxSurfExtractReq ireq)
    {
        SurfExtractReqMC req  = ireq as SurfExtractReqMC;
        VFVoxelChunkGo   vfGo = VFVoxelChunkGo.CreateChunkGo(req, _waterMat, s_layer);

        if (vfGo != null)
        {
            vfGo.transform.parent = gameObject.transform;
        }
        req._chunk.AttachChunkGo(vfGo, req);
    }
Ejemplo n.º 3
0
    void ProcGenSeaSurface(SurfExtractReqMC req)
    {
        _tmpSeaSurfaceVerts.Clone(_seaSurfaceVerts [req._chunk.LOD]);           // To avoid outputdata(_seaSurfaceVerts) from clearing
        req.AddOutData(_tmpSeaSurfaceVerts);

        VFVoxelChunkGo vfGo = VFVoxelChunkGo.CreateChunkGo(req, _waterMat, s_layer);

        vfGo.transform.parent = gameObject.transform;
        req._chunkData        = _tmpSurfChunkData4Req;
        req._chunk.AttachChunkGo(vfGo, req);
    }