NGUI Atlas ( change atlas )
Unity3D 2019. 1. 25. 18:36NGUI 3 Support / Re: Latest Version: 3.12.1 (June 28, 2018)
« Last post by ArenMook on December 13, 2018, 11:52:00 AM »- NEW: As the name suggests, support for Unity 2018.3 and its new prefab workflow. Still supports previous versions, including Unity 5.6.
- NEW: NGUI's atlases and fonts are now saved as ScriptableObjects instead of prefabs. To upgrade, select any old prefab-based atlas or font, and the Upgrade button will show up. BACK UP FIRST just in case! After the new asset gets created, the old atlas or font will be changed to Reference type, pointing to it. You can use the new asset directly, of course -- and if you are Unity savvy enough, you can swap their GUIDs from the meta files, effectively removing the need for the reference asset altogether.
- NEW: Added a new widget type: Sprite Collection. It can be used to efficiently add thousands of sprites without the overhead of creating game objects. This is meant to be used from code by programmers, but can speed up the creation and modification of sprites by several orders of magnitude. In Sightseer it allowed the world map creation to go from 3348 ms down to 22 ms, for example.
- NEW: Added UITweener.Finish() to immediately finish the tween, skipping to the end.
- FIX: Some fixes for key binding text form serialization.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestNewNGUI : MonoBehaviour { public NGUIAtlas newAtlas; public UIAtlas oldAtlas; public UISprite sp; public UIButton btn; // Start is called before the first frame update void Start() { var spAtlas = sp.GetAtlasSprite(); Debug.LogFormat("{0}, {1}, {2}", spAtlas.GetType(), newAtlas.GetType(), oldAtlas.GetType()); btn.onClick.Subscribe(() => { this.sp.atlas = this.newAtlas; System.Random r = new System.Random(); this.sp.spriteName = newAtlas.spriteList[r.Next(newAtlas.spriteList.Count)].name; this.sp.MakePixelPerfect(); }); } // Update is called once per frame void Update() { } } | cs |
c# list random select : https://stackoverflow.com/questions/2019417/how-to-access-random-item-in-list
'Unity3D' 카테고리의 다른 글
memu adb logcat port (0) | 2019.02.01 |
---|---|
Google Play 앱 서명 사용 (0) | 2019.01.31 |
Overview - Intro To The Entity Component System And C# Job System 1/5 (0) | 2019.01.23 |
Improved Prefab Workflows Nested Prefabs, Prefab Mode and Prefab Variants (0) | 2019.01.18 |
유니티 데이터 패스 정리 (0) | 2019.01.16 |