コード例 #1
0
        public int BlendshapeAnimTest(float [] keyTimesInSeconds, float [] keyValues, System.Type componentType, string componentName)
        {
            var prefabPath = FindPathInUnitTests("Models/blendshape.fbx");

            Assert.That(prefabPath, Is.Not.Null);

            // add prefab to scene
            GameObject originalGO = AddAssetToScene(prefabPath);

            KeyData keyData = new PropertyKeyData {
                targetObject   = originalGO,
                propertyName   = componentName,
                componentType  = componentType,
                keyTimes       = keyTimesInSeconds,
                keyFloatValues = keyValues
            };

            var tester = new AnimTester {
                keyData = keyData, testName = componentName, path = GetRandomFbxFilePath()
            };

            var exportOptions = new ExportModelSettingsSerialize();

            exportOptions.SetAnimatedSkinnedMesh(true);

            tester.exportOptions = exportOptions;
            return(tester.DoIt());
        }
コード例 #2
0
        public int SimplePropertyAnimTest(float [] keyTimesInSeconds, float [] keyValues, System.Type componentType, string componentName)
        {
            KeyData keyData = new PropertyKeyData {
                propertyName = componentName, componentType = componentType, keyTimes = keyTimesInSeconds, keyFloatValues = keyValues
            };

            var tester = new AnimTester {
                keyData = keyData, testName = componentName, path = GetRandomFbxFilePath()
            };

            return(tester.DoIt());
        }