示例#1
0
 public void AddArtist(SceneArtist artist)
 {
     if (artists == null)
     {
         artists = new List <SceneArtist>();
     }
     artists.Add(artist);
 }
示例#2
0
            public void ProcessLoadedData()
            {
                foreach (FrameSaveData f in frameSaveData)
                {
                    foreach (string artistSaveString in f.artistJsonStrings)
                    {
                        SceneArtist baseArtist = JsonUtility.FromJson <SceneArtist>(artistSaveString);

                        if (!string.IsNullOrEmpty(baseArtist.artistType) && System.Type.GetType(baseArtist.artistType) != null)
                        {
                            SceneArtist artist = JsonUtility.FromJson(artistSaveString, System.Type.GetType(baseArtist.artistType)) as SceneArtist;
                            f.frame.AddArtist(artist);
                        }
                    }
                }
            }