예제 #1
0
 /// <summary>
 /// 将信息到保存到PanelGroup
 /// </summary>
 /// <param name="group"></param>
 private void StoreInfoOfPanel(PanelGroup group)
 {
     InsertBridges(group.bridges, GetBridges());
     if (group.loadType == LoadType.Prefab)
     {
         InsertPrefabinfo(group.p_nodes, GetPrefabUIInfos(GetNodeInfos()));
     }
     else if (group.loadType == LoadType.Bundle)
     {
         InsertBundleinfo(group.b_nodes, GetBundleUIInfos(GetNodeInfos()));
     }
     TryRecoredGraphGUID(group);
     EditorUtility.SetDirty(group);
 }
예제 #2
0
        private void TryRecoredGraphGUID(PanelGroup group)
        {
            var path = AssetDatabase.GetAssetPath(TargetGraph);
            var guid = AssetDatabase.AssetPathToGUID(path);

            if (group is PanelGroup)
            {
                var panelGroup = group as PanelGroup;
                var record     = panelGroup.graphList.Find(x => x.guid == guid);
                if (record == null)
                {
                    var item = new GraphWorp(TargetGraph.name, guid);
                    panelGroup.graphList.Add(item);
                }
                else
                {
                    record.graphName = TargetGraph.name;
                }
            }
        }