コード例 #1
0
        private UEGenericStructProperty ReadUEGenericStructProperty(JObject o)
        {
            UEGenericStructProperty value = new UEGenericStructProperty();

            foreach (JObject prop in o["Properties"])
            {
                value.Properties.Add(ReadUEProperty(prop));
            }

            return(value);
        }
コード例 #2
0
        public UEProperty[] ExportPlaylist(List <string> scenariosList, UEGenericStructProperty scenarioItem)
        {
            var sampleName  = (UEStringProperty)scenarioItem.Properties[0];
            var sampleCount = (UEIntProperty)scenarioItem.Properties[1];
            var sampleNone  = (UENoneProperty)scenarioItem.Properties[2];

            var proparr = new List <UEProperty>();

            foreach (var scene in scenariosList)
            {
                var name  = new UEStringProperty();
                var count = new UEIntProperty();
                var nil   = new UENoneProperty();

                name.Value = scene;
                name.Name  = sampleName.Name;
                name.Type  = sampleName.Type;

                count.Value = 1;
                count.Name  = sampleCount.Name;
                count.Type  = sampleCount.Type;

                var scenarioProp = new UEGenericStructProperty();
                scenarioProp.Properties = new List <UEProperty>();
                scenarioProp.Name       = string.Copy(scenarioItem.Name);
                scenarioProp.Type       = string.Copy(scenarioItem.Type);
                scenarioProp.Header     = string.Copy(scenarioItem.Header);
                //scenarioProp.StructType = string.Copy(scenarioItem.StructType);



                scenarioProp.Properties.Add(name);
                scenarioProp.Properties.Add(count);
                scenarioProp.Properties.Add(sampleNone);
                proparr.Add(scenarioProp);
            }

            return(proparr.ToArray());
        }