Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: magicpotato on March 06, 2015, 05:07:21 AM

Title: Unity5 AssetBundle support
Post by: magicpotato on March 06, 2015, 05:07:21 AM
Hello ArenMook.

You know, Unity5 was announced.
And AssetBundle workflow also updated very powerful.
It don't need to attach resources dynamically anymore.
Today I tested the AssetBundle.

But I failed with NGUI.
Reason is simple.

Loading streamed-scene will fail if exist game object that have component with a script property type and value is prefab's script.

  1. class UISprite
  2. {
  3.   [SerializeField] UIAtlas mAtlas; // It's prefab's script. Not works for AssetBundle
  4. }


I changed the property type to GameObject(prefab) from Script(prefab's script).
It works.

  1. class UIScript
  2. {
  3.   [SerializeField] GameObject mAtlasPrefab; // for AB, use mAtlasPrefab.GetComponent<UIAtlas>()...
  4. }
  5.  
Other controls are same.

I think NGUI's first weak point is this issue.
I have to change the code to publish my game even you don't support AssetBundle for NGUI.
Because there is only one, NGUI.


But I'm worrying about to merge next updates.

I think there's many peoples like me.
I hope good news.

Thanks for made nice asset.
Title: Re: Unity5 AssetBundle support
Post by: jarjin on March 07, 2015, 01:19:27 AM
Me too!!~~
Title: Re: Unity5 AssetBundle support
Post by: ArenMook on March 10, 2015, 07:52:13 PM
If I change this value from UISprite to GameObject it will break all existing projects, and sprites will lose all references to their atlases.
Title: Re: Unity5 AssetBundle support
Post by: magicpotato on March 11, 2015, 12:20:41 AM
Is there no way to make migration editor function?
Anyway I finished the job. It works.


Title: Re: Unity5 AssetBundle support
Post by: jarjin on March 11, 2015, 07:09:56 AM
If I change this value from UISprite to GameObject it will break all existing projects, and sprites will lose all references to their atlases.

Is it right? NGUI cannot support the new Unity AssetBundle format?
Title: Re: Unity5 AssetBundle support
Post by: ArenMook on March 12, 2015, 07:49:23 PM
You are welcome to make the same change as magicpotato if you need it. I can't do it because I don't want to break existing projects.