using System; namespace LibMMD.Unity3D { public enum LilToonPreset { OutlineShadow, Anime, Illustration, } public class MmdUnityConfig { public MmdConfigSwitch EnableDrawSelfShadow; public MmdConfigSwitch EnableCastShadow; public MmdConfigSwitch EnableEdge; public bool EnableTextureAlphaScan; public string ShaderAdapterId = MmdMaterialAdapterIds.Mmd; public LilToonPreset LilToonPreset = LilToonPreset.OutlineShadow; // Used by the custom adapter. Keeping this as a shader name avoids a // hard dependency on optional shader packages such as NiroToon. public string CustomShaderName; public static bool DealSwitch(MmdConfigSwitch switchVal, bool configVal) { switch (switchVal) { case MmdConfigSwitch.AsConfig: return configVal; case MmdConfigSwitch.ForceTrue: return true; case MmdConfigSwitch.ForceFalse: return false; default: throw new ArgumentOutOfRangeException("switchVal", switchVal, null); } } } }