Author Topic: Unity5 AssetBundle support  (Read 11437 times)

magicpotato

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Unity5 AssetBundle support
« 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.

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Unity5 AssetBundle support
« Reply #1 on: March 07, 2015, 01:19:27 AM »
Me too!!~~
« Last Edit: March 07, 2015, 08:26:34 PM by jarjin »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity5 AssetBundle support
« Reply #2 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.

magicpotato

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Unity5 AssetBundle support
« Reply #3 on: March 11, 2015, 12:20:41 AM »
Is there no way to make migration editor function?
Anyway I finished the job. It works.



jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Unity5 AssetBundle support
« Reply #4 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity5 AssetBundle support
« Reply #5 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.