Beispiel #1
0
 public override void Initialize(Model.NodeData data)
 {
     m_path  = new SerializableMultiTargetString();
     m_style = AssertionStyle.AllowOnlyAssetsUnderAssertionPath;
     data.AddDefaultInputPoint();
     data.AddDefaultOutputPoint();
 }
 public override void Initialize(Model.NodeData data)
 {
     _enabledOptions = new SerializableMultiTargetInt();
     _outputDir      = new SerializableMultiTargetString();
     _outputOption   = new SerializableMultiTargetInt();
     data.AddDefaultInputPoint();
     data.AddDefaultOutputPoint();
 }
 public override void Initialize(Model.NodeData data)
 {
     _enabledPerPlatformOptions = new SerializableMultiTargetInt();
     _workingOption             = new SerializableMultiTargetInt();
     _filterString = new SerializableMultiTargetString();
     data.AddDefaultOutputPoint();
     data.AddDefaultInputPoint();
 }
Beispiel #4
0
        public override void Initialize(Model.NodeData data)
        {
            if (m_loadPath == null)
            {
                m_loadPath = new SerializableMultiTargetString();
            }

            data.AddDefaultOutputPoint();
        }
Beispiel #5
0
        public override void Initialize(Model.NodeData data)
        {
            //Take care of this with Initialize(NodeData)
            m_exportPath   = new SerializableMultiTargetString();
            m_exportOption = new SerializableMultiTargetInt();
            m_flattenDir   = new SerializableMultiTargetInt();

            data.AddDefaultInputPoint();
        }
Beispiel #6
0
        public override void Initialize(Model.NodeData data)
        {
            m_groupingKeyword = new SerializableMultiTargetString(Model.Settings.GROUPING_KEYWORD_DEFAULT);
            m_patternType     = new SerializableMultiTargetInt((int)GroupingPatternType.WildCard);
            m_allowSlash      = false;

            data.AddDefaultInputPoint();
            data.AddDefaultOutputPoint();
        }
        public override void Initialize(Model.NodeData data)
        {
            m_bundleNameTemplate = new SerializableMultiTargetString(Model.Settings.BUNDLECONFIG_BUNDLENAME_TEMPLATE_DEFAULT);
            m_useGroupAsVariants = false;
            m_variants           = new List <Variant>();

            data.AddDefaultInputPoint();
            data.AddDefaultOutputPoint();
        }
        public void Import(V1.NodeData v1, Model.NodeData v2)
        {
            m_bundleNameTemplate = new SerializableMultiTargetString(v1.BundleNameTemplate);
            m_useGroupAsVariants = v1.BundleConfigUseGroupAsVariants;

            foreach (var v in v1.Variants)
            {
                m_variants.Add(new Variant(v.Name, v2.FindInputPoint(v.ConnectionPointId)));
            }
        }
Beispiel #9
0
        public override void Initialize(Model.NodeData data)
        {
            m_spritePackingTagNameTemplate = new SerializableMultiTargetString("*");
            m_overwritePackingTag          = false;
            m_useCustomSettingAsset        = false;
            m_customSettingAssetGuid       = string.Empty;

            data.AddDefaultInputPoint();
            data.AddDefaultOutputPoint();
        }
Beispiel #10
0
 public void Import(V1.NodeData v1, Model.NodeData v2)
 {
     m_loadPath = new SerializableMultiTargetString(v1.LoaderLoadPath);
 }
Beispiel #11
0
 public Loader(string path)
 {
     m_loadPath = new SerializableMultiTargetString(NormalizeLoadPath(path));
 }
Beispiel #12
0
 public override void Initialize(Model.NodeData data)
 {
     m_myValue = new SerializableMultiTargetString();
     data.AddDefaultInputPoint();
     data.AddDefaultOutputPoint();
 }
Beispiel #13
0
 public void Import(V1.NodeData v1, Model.NodeData v2)
 {
     m_exportPath   = new SerializableMultiTargetString(v1.ExporterExportPath);
     m_exportOption = new SerializableMultiTargetInt(v1.ExporterExportOption);
     m_flattenDir   = new SerializableMultiTargetInt();
 }
Beispiel #14
0
 public void Import(V1.NodeData v1, Model.NodeData v2)
 {
     m_groupingKeyword = new SerializableMultiTargetString(v1.GroupingKeywords);
     m_patternType     = new SerializableMultiTargetInt((int)GroupingPatternType.WildCard);
     m_allowSlash      = true;
 }
Beispiel #15
0
        /*
         * Constructor used to create new node from GUI
         */
        public NodeData(string name, NodeKind kind, float x, float y)
        {
            m_id = Guid.NewGuid().ToString();
            m_name = name;
            m_x = x;
            m_y = y;
            m_kind = kind;

            m_inputPoints  = new List<ConnectionPointData>();
            m_outputPoints = new List<ConnectionPointData>();

            // adding defalut input point.
            // Loader does not take input
            if(kind != NodeKind.LOADER_GUI) {
                m_inputPoints.Add(new ConnectionPointData(AssetBundleGraphSettings.DEFAULT_INPUTPOINT_LABEL, this, true));
            }

            // adding default output point.
            // Filter and Exporter does not have output.
            if(kind != NodeKind.FILTER_GUI && kind != NodeKind.EXPORTER_GUI) {
                m_outputPoints.Add(new ConnectionPointData(AssetBundleGraphSettings.DEFAULT_OUTPUTPOINT_LABEL, this, false));
            }

            switch(m_kind) {
            case NodeKind.PREFABBUILDER_GUI:
            case NodeKind.MODIFIER_GUI:
                m_scriptClassName 	= String.Empty;
                m_scriptInstanceData = new SerializableMultiTargetString();
                break;

            case NodeKind.IMPORTSETTING_GUI:
                break;

            case NodeKind.FILTER_GUI:
                m_filter = new List<FilterEntry>();
                break;

            case NodeKind.LOADER_GUI:
                m_loaderLoadPath = new SerializableMultiTargetString();
                break;

            case NodeKind.GROUPING_GUI:
                m_groupingKeyword = new SerializableMultiTargetString(AssetBundleGraphSettings.GROUPING_KEYWORD_DEFAULT);
                break;

            case NodeKind.BUNDLECONFIG_GUI:
                m_bundleConfigBundleNameTemplate = new SerializableMultiTargetString(AssetBundleGraphSettings.BUNDLECONFIG_BUNDLENAME_TEMPLATE_DEFAULT);
                m_variants = new List<Variant>();
                break;

            case NodeKind.BUNDLEBUILDER_GUI:
                m_bundleBuilderEnabledBundleOptions = new SerializableMultiTargetInt();
                break;

            case NodeKind.EXPORTER_GUI:
                m_exporterExportPath = new SerializableMultiTargetString();
                break;

            default:
                throw new AssetBundleGraphException("[FATAL]Unhandled nodekind. unimplmented:"+ m_kind);
            }
        }
Beispiel #16
0
        /*
         *  Create NodeData from JSON
         */
        public NodeData(Dictionary<string, object> jsonData)
        {
            m_name = jsonData[NODE_NAME] as string;
            m_id = jsonData[NODE_ID]as string;
            m_kind = AssetBundleGraphSettings.NodeKindFromString(jsonData[NODE_KIND] as string);

            var pos = jsonData[NODE_POS] as Dictionary<string, object>;
            m_x = (float)Convert.ToDouble(pos[NODE_POS_X]);
            m_y = (float)Convert.ToDouble(pos[NODE_POS_Y]);

            var inputs  = jsonData[NODE_INPUTPOINTS] as List<object>;
            var outputs = jsonData[NODE_OUTPUTPOINTS] as List<object>;
            m_inputPoints  = new List<ConnectionPointData>();
            m_outputPoints = new List<ConnectionPointData>();

            foreach(var obj in inputs) {
                var pDic = obj as Dictionary<string, object>;
                m_inputPoints.Add(new ConnectionPointData(pDic, this, true));
            }

            foreach(var obj in outputs) {
                var pDic = obj as Dictionary<string, object>;
                m_outputPoints.Add(new ConnectionPointData(pDic, this, false));
            }

            switch (m_kind) {
            case NodeKind.IMPORTSETTING_GUI:
                // nothing to do
                break;
            case NodeKind.PREFABBUILDER_GUI:
            case NodeKind.MODIFIER_GUI:
                {
                    if(jsonData.ContainsKey(NODE_SCRIPT_CLASSNAME)) {
                        m_scriptClassName = jsonData[NODE_SCRIPT_CLASSNAME] as string;
                    }
                    if(jsonData.ContainsKey(NODE_SCRIPT_INSTANCE_DATA)) {
                        m_scriptInstanceData = new SerializableMultiTargetString(jsonData[NODE_SCRIPT_INSTANCE_DATA] as Dictionary<string, object>);
                    }
                }
                break;
            case NodeKind.LOADER_GUI:
                {
                    m_loaderLoadPath = new SerializableMultiTargetString(jsonData[NODE_LOADER_LOAD_PATH] as Dictionary<string, object>);
                }
                break;
            case NodeKind.FILTER_GUI:
                {
                    var filters = jsonData[NODE_FILTER] as List<object>;

                    m_filter = new List<FilterEntry>();

                    for(int i=0; i<filters.Count; ++i) {
                        var f = filters[i] as Dictionary<string, object>;

                        var keyword = f[NODE_FILTER_KEYWORD] as string;
                        var keytype = f[NODE_FILTER_KEYTYPE] as string;
                        var pointId = f[NODE_FILTER_POINTID] as string;

                        var point = m_outputPoints.Find(p => p.Id == pointId);
                        UnityEngine.Assertions.Assert.IsNotNull(point, "Output point not found for " + keyword);
                        m_filter.Add(new FilterEntry(keyword, keytype, point));
                    }
                }
                break;
            case NodeKind.GROUPING_GUI:
                {
                    m_groupingKeyword = new SerializableMultiTargetString(jsonData[NODE_GROUPING_KEYWORD] as Dictionary<string, object>);
                }
                break;
            case NodeKind.BUNDLECONFIG_GUI:
                {
                    m_bundleConfigBundleNameTemplate = new SerializableMultiTargetString(jsonData[NODE_BUNDLECONFIG_BUNDLENAME_TEMPLATE] as Dictionary<string, object>);
                    m_variants = new List<Variant>();
                    if(jsonData.ContainsKey(NODE_BUNDLECONFIG_VARIANTS)){
                        var variants = jsonData[NODE_BUNDLECONFIG_VARIANTS] as List<object>;

                        for(int i=0; i<variants.Count; ++i) {
                            var v = variants[i] as Dictionary<string, object>;

                            var name    = v[NODE_BUNDLECONFIG_VARIANTS_NAME] as string;
                            var pointId = v[NODE_BUNDLECONFIG_VARIANTS_POINTID] as string;

                            var point = m_inputPoints.Find(p => p.Id == pointId);
                            UnityEngine.Assertions.Assert.IsNotNull(point, "Input point not found for " + name);
                            m_variants.Add(new Variant(name, point));
                        }
                    }
                }
                break;
            case NodeKind.BUNDLEBUILDER_GUI:
                {
                    m_bundleBuilderEnabledBundleOptions = new SerializableMultiTargetInt(jsonData[NODE_BUNDLEBUILDER_ENABLEDBUNDLEOPTIONS] as Dictionary<string, object>);
                }
                break;
            case NodeKind.EXPORTER_GUI:
                {
                    m_exporterExportPath = new SerializableMultiTargetString(jsonData[NODE_EXPORTER_EXPORT_PATH] as Dictionary<string, object>);
                }
                break;
            default:
                throw new ArgumentOutOfRangeException ();
            }
        }