예제 #1
0
        /// <summary>
        /// Allows dynamic loading of <see cref="CustomPlatform"/>s from files.
        /// </summary>
        /// <param name="path">The path of file containing the <see cref="CustomPlatform"/></param>
        /// <returns>The reference to the loaded <see cref="CustomPlatform"/></returns>
        public static CustomPlatform AddPlatform(string path)
        {
            CustomPlatform newPlatform = PlatformLoader.LoadPlatformBundle(path, Anchor.transform);

            if (newPlatform != null)
            {
                AllPlatforms.Add(newPlatform);
            }
            return(newPlatform);
        }
예제 #2
0
        public CustomPlatform AddPlatform(string path)
        {
            CustomPlatform newPlatform = platformLoader.LoadPlatformBundle(path, transform);

            if (newPlatform != null)
            {
                var platList = platforms.ToList();
                platList.Add(newPlatform);
                platforms = platList.ToArray();
            }
            return(newPlatform);
        }