Ejemplo n.º 1
0
        private static void ParseConfig(ConfigNode node)
        {
            ParseUtil.ParseIntIndirect(ref _decalLayer, node, "decalLayer");
            ParseUtil.ParseBoolIndirect(ref _selectableInFlight, node, "selectableInFlight");

            foreach (var blacklist in node.GetNodes("SHADERBLACKLIST"))
            {
                foreach (var shaderName in blacklist.GetValuesList("shader"))
                {
                    _shaderBlacklist.Add(shaderName);
                }
            }

            var allFonts = Resources.FindObjectsOfTypeAll <TMP_FontAsset>();

            foreach (var fontNode in node.GetNodes("FONT"))
            {
                try {
                    var font = new DecalFont(fontNode, allFonts);
                    _fontList.Add(font.Name, font);
                }
                catch (Exception e) {
                    Debug.LogException(e);
                }
            }
        }
        public override void ParseNode(ConfigNode node)
        {
            base.ParseNode(node);

            ParseUtil.ParseBoolIndirect(ref value, node, "value");
        }