コード例 #1
0
        private static void CreateStlPrefab(string stlFile)
        {
            GameObject gameObject = CreateStlParent(stlFile);

            if (!gameObject)
            {
                Debug.LogWarning($"Could not create a mesh prefab for {stlFile}");
                return;
            }

            RuntimeUrdf.PrefabUtility_SaveAsPrefabAsset(gameObject, GetPrefabAssetPath(stlFile));
            Object.DestroyImmediate(gameObject);
        }
コード例 #2
0
 public void PrefabUtility_SaveAsPrefabAsset_AssetAsRoot()
 {
     RuntimeUrdf.runtimeModeEnabled = false;
     Assert.IsNotNull(RuntimeUrdf.PrefabUtility_SaveAsPrefabAsset(new GameObject("TestAsset2"), $"{createAssetPath}/TestAsset2.prefab"));
 }