mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-14 23:10:46 -05:00
Merge pull request #1904 from Santarh/suppressPreprocessor
Use static getter instead of preprocessors.
This commit is contained in:
@@ -118,10 +118,11 @@ namespace VRM
|
||||
{
|
||||
if (!string.IsNullOrEmpty(AssetDatabase.GetAssetPath(o)))
|
||||
{
|
||||
#if VRM_DEVELOP
|
||||
// 来ない?
|
||||
Debug.LogWarning($"{o} already exists. skip write");
|
||||
#endif
|
||||
if (Symbols.VRM_DEVELOP)
|
||||
{
|
||||
// 来ない?
|
||||
Debug.LogWarning($"{o} already exists. skip write");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
using VRMShaders;
|
||||
using UniGLTF;
|
||||
|
||||
|
||||
namespace VRM
|
||||
{
|
||||
/// <summary>
|
||||
@@ -56,14 +51,17 @@ namespace VRM
|
||||
// HideFlags are special editor-only settings that let you have *secret* GameObjects in a scene, or to tell Unity not to save that temporary GameObject as part of the scene
|
||||
foreach (var x in go.transform.Traverse())
|
||||
{
|
||||
x.gameObject.hideFlags = HideFlags.None
|
||||
| HideFlags.DontSave
|
||||
//| HideFlags.DontSaveInBuild
|
||||
#if VRM_DEVELOP
|
||||
#else
|
||||
| HideFlags.HideAndDontSave
|
||||
#endif
|
||||
;
|
||||
if (Symbols.VRM_DEVELOP)
|
||||
{
|
||||
x.gameObject.hideFlags = HideFlags.None |
|
||||
HideFlags.DontSave;
|
||||
}
|
||||
else
|
||||
{
|
||||
x.gameObject.hideFlags = HideFlags.None |
|
||||
HideFlags.DontSave |
|
||||
HideFlags.HideAndDontSave;
|
||||
}
|
||||
}
|
||||
|
||||
return manager;
|
||||
|
||||
@@ -22,9 +22,10 @@ namespace VRM
|
||||
// pbr "Standard" to "Universal Render Pipeline/Lit"
|
||||
if (GltfPbrUrpMaterialImporter.TryCreateParam(data, i, out matDesc)) return matDesc;
|
||||
// fallback
|
||||
#if VRM_DEVELOP
|
||||
Debug.LogWarning($"material: {i} out of range. fallback");
|
||||
#endif
|
||||
if (Symbols.VRM_DEVELOP)
|
||||
{
|
||||
Debug.LogWarning($"material: {i} out of range. fallback");
|
||||
}
|
||||
return new MaterialDescriptor(
|
||||
GltfMaterialDescriptorGenerator.GetMaterialName(i, null),
|
||||
GltfPbrMaterialImporter.ShaderName,
|
||||
|
||||
Reference in New Issue
Block a user