Exemple #1
0
        private static bool SetColliderProcessEnable(bool value)
        {
            Debug.Log("SetColliderProcessEnable value = " + value);
            int result = (int)Error.FAILED;

            if (value)
            {
                result = SRWorkModule_API.SetSkipVGAProcess(false);
                result = SRWorkModule_API.LinkModule((int)ModuleType.DEPTH, (int)ModuleType.DEPTHMESH);
            }
            else
            {
                result = SRWorkModule_API.UnlinkModule((int)ModuleType.DEPTH, (int)ModuleType.DEPTHMESH);
            }

            if (value != _UpdateDepthCollider)
            {
                if (result == (int)Error.WORK)
                {
                    result = SRWorkModule_API.SetDepthMeshIsEnable(value);
                }
            }
            if (result == (int)Error.WORK)
            {
                _UpdateDepthCollider = value;
            }
            if (_UpdateDepthCollider == false)
            {
                ColliderMeshes.sharedMesh.Clear();
                ColliderMeshVisibility = false;
            }
            else
            {
                ColliderMeshVisibility = true;
            }

            return(true);
        }