Exemplo n.º 1
0
        internal PlayerBuildExecutor(AnyDictionary dict)
        {
            Target      = StringEnumConverter.Get <BuildTarget>()[dict.GetValue <string>("target")];
            TargetGroup = StringEnumConverter.Get <BuildTargetGroup>()[dict.GetValue <string>("targetGroup")];

            var optionmap = dict.GetDict("options");

            Options = GetOptions(optionmap);

            this.scenes = GetScenes();
        }
        public void Reload(AnyDictionary dict)
        {
            enabled = dict.GetValue <bool>("enabled");

            var deviceListStr = dict.GetValue <string>("devices");

            this.devices = deviceListStr.Split(',');

            var table = StringEnumConverter.Get <StereoRenderingPath>();

            stereoRenderingPath = table[dict.GetValue <string>("stereoRenderingPath")];
        }
Exemplo n.º 3
0
        public void MustGetValueTest()
        {
            var dict = StringEnumConverter.Get <ScriptingImplementation>();

            ScriptingImplementation val = ScriptingImplementation.Mono2x;
            bool ok = false;

            // blank
            ok = dict.MustGetValue("", out val);
            Assert.AreEqual(false, ok);

            // exist
            ok = dict.MustGetValue("Mono2x", out val);
            Assert.AreEqual(true, ok);
            Assert.AreEqual(ScriptingImplementation.Mono2x, val);

            // not exist key
            ok = dict.MustGetValue("invalid", out val);
            Assert.AreEqual(false, ok);
        }
Exemplo n.º 4
0
        public void Reload(AnyDictionary dict)
        {
            enabled = dict.GetValue <bool>("enabled");

            var rawDeviceList = dict.GetList("devices");
            var deviceList    = new List <string>();

            for (var i = 0; i < rawDeviceList.Count; i++)
            {
                var el = rawDeviceList[i] as string;
                if (el != null)
                {
                    deviceList.Add(el);
                }
            }
            this.devices = deviceList.ToArray();

            var table = StringEnumConverter.Get <StereoRenderingPath>();

            stereoRenderingPath = table[dict.GetValue <string>("stereoRenderingPath")];
        }
Exemplo n.º 5
0
        static BuildOptions GetOptions(Dictionary <string, object> map)
        {
            var opts  = BuildOptions.None;
            var table = StringEnumConverter.Get <BuildOptions>();

            foreach (var kv in map)
            {
                if (kv.Value.GetType() != typeof(bool))
                {
                    continue;
                }
                var val = (bool)kv.Value;
                if (!val)
                {
                    continue;
                }

                var mask = table[kv.Key];
                opts = opts | mask;
            }
            return(opts);
        }
Exemplo n.º 6
0
        public void Apply()
        {
            if (android_useApkExpansion.Flag)
            {
                PlayerSettings.Android.useAPKExpansionFiles = android_useApkExpansion;
            }

            var capabilityList = uwp_capability.ToList();
            var table          = StringEnumConverter.Get <PlayerSettings.WSACapability>();

            foreach (var kv in table)
            {
                var flag = capabilityList.Contains(kv.Key);
                PlayerSettings.WSA.SetCapability(kv.Value, flag);
            }

            if (ps4_attribExclusiveVR.Flag)
            {
                PlayerSettings.PS4.attribExclusiveVR = ps4_attribExclusiveVR;
            }
            if (ps4_attribShareSupport.Flag)
            {
                PlayerSettings.PS4.attribShareSupport = ps4_attribShareSupport;
            }
            if (ps4_attribMoveSupport.Flag)
            {
                PlayerSettings.PS4.attribMoveSupport = ps4_attribMoveSupport;
            }
            if (ps4_category.Flag)
            {
                PlayerSettings.PS4.category = ps4_category;
            }
            if (ps4_masterVersion.Flag)
            {
                PlayerSettings.PS4.masterVersion = ps4_masterVersion;
            }
            if (ps4_contentID.Flag)
            {
                PlayerSettings.PS4.contentID = ps4_contentID;
            }
            if (ps4_applicationParameter1.Flag)
            {
                PlayerSettings.PS4.applicationParameter1 = ps4_applicationParameter1;
            }
            if (ps4_applicationParameter2.Flag)
            {
                PlayerSettings.PS4.applicationParameter1 = ps4_applicationParameter2;
            }
            if (ps4_applicationParameter3.Flag)
            {
                PlayerSettings.PS4.applicationParameter1 = ps4_applicationParameter3;
            }
            if (ps4_applicationParameter4.Flag)
            {
                PlayerSettings.PS4.applicationParameter1 = ps4_applicationParameter4;
            }
            if (ps4_enterButtonAssignment.Flag)
            {
                PlayerSettings.PS4.enterButtonAssignment = ps4_enterButtonAssignment;
            }
        }