private IEnumerator Start() { SetUnityStreamingAssetsPath(Application.streamingAssetsPath); int textureHeight, textureWidth; //if (Meta.Internal.HandPhysics.CppMetaPhysicsManager.Instance.usePMD) // Disabled for use with prototyping physics simulation if (usePMD) { currentNativeTexture = pmdPointCloudTexture; textureHeight = 224; textureWidth = 171; } else { currentNativeTexture = depthPointCloudTexture; textureHeight = 320; textureWidth = 240; } currentNativeTexture.CreateTextureAndPassToPlugin(textureHeight, textureWidth); width = (uint)textureHeight; height = (uint)textureWidth; // create a list to hold the game objects meshObjects = new List <GameObject>(); // attach the meshes to the game objects. CreateGameObjects(); ApplyTexture(currentNativeTexture); yield return(StartCoroutine("CallPluginAtEndOfFrames")); }
/// <summary> MetaBehavior Update. </summary> private void Update() { if (initlialzed && !_textureCreated) { currentNativeTexture.CreateTextureAndPassToPlugin((int)height, (int)width); InitOclussionManager(); _textureCreated = true; } else if (!initlialzed) { if (HandKernelInterop.GetSensorMetaData(ref _sensorMetaData)) { height = (uint)_sensorMetaData.width; width = (uint)_sensorMetaData.height; initlialzed = true; } } }