Author Topic: NGUI and Flash platform  (Read 2368 times)

khkcontact

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
NGUI and Flash platform
« on: February 02, 2014, 07:52:23 PM »
Is the latest version of NGUI has any known problems with applications built for Flash platform and what are their workaround?
What is priority of issues for this platform and how fast they are fixed?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: NGUI and Flash platform
« Reply #1 on: February 04, 2014, 02:01:55 AM »
No known issues.

khkcontact

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: NGUI and Flash platform
« Reply #2 on: February 04, 2014, 04:58:59 AM »
Thank you for your answer. I hope it so as I plan to buy this component myself for my own projects. 
But last time when I was using NGUI (it was latest at that moment 3.06.f6) and previous versions > 3.0.1,
it was necessary to fix several problems with Flash builds every update caused by some problems in Unity3d flash compiler.
It was not hard but it was annoying: yes, the root of problems could not be fixed in NGUI but workarounds could be done.
 
NGUI is fine system... And all is fine with Unity3d web player and other platforms...

But for most of my jobs Flash builds is necessary.
And I was scared that since 3.0 authors of NGUI ignores Flash platform as it is too rare and unpopular for Unity3d developers...
Unfortunately, most of web platform users still don't like to install any plugins except Flash.

I am glad that Flash is still supported

vicenterusso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: NGUI and Flash platform
« Reply #3 on: February 22, 2014, 02:12:27 PM »
Well, I started a fresh project, imported NGUI (lastest from Asset Store) and tried to build Scene "Example 11 - Drag & Drop".

Erros:

  1. Error building Player: Exception: java Failed:
  2. Loading configuration file C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\flashsupport\BuildTools\flex\frameworks\flex-config.xml
  3.  

  1. D:\testproject\Temp\StagingArea\Data\ConvertedDotNetCode\global\UILabel.as(740): col: 38 Error: Call to a possibly undefined method String_LastIndexOf_Char_Int32_Int32 through a reference with static type Class.
  2.  
  3.                                 var $num: int = StringOperations.String_LastIndexOf_Char_Int32_Int32(this.UILabel$mText$, 32, $characterIndex, $characterIndex) + 1;
  4.                                                                  ^
  5.  
  6.  

So, are NGUI still supporting flash? Am I doing something wrong?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: NGUI and Flash platform
« Reply #4 on: February 23, 2014, 11:01:06 AM »
No, I did. UILabel.GetWordAtCharacter function should be:
  1.         public string GetWordAtCharacterIndex (int characterIndex)
  2.         {
  3.                 if (characterIndex != -1 && characterIndex < mText.Length)
  4.                 {
  5.                         int linkStart = mText.LastIndexOf(' ', characterIndex) + 1; // <-- this line changes
  6.                         int linkEnd = mText.IndexOf(' ', characterIndex);
  7.                         if (linkEnd == -1) linkEnd = mText.Length;
  8.  
  9.                         if (linkStart != linkEnd)
  10.                         {
  11.                                 string word = mText.Substring(linkStart, linkEnd - linkStart);
  12.                                 return NGUIText.StripSymbols(word);
  13.                         }
  14.                 }
  15.                 return null;
  16.         }

vicenterusso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: NGUI and Flash platform
« Reply #5 on: February 23, 2014, 03:40:18 PM »
Cool! thank you, it worked :)

Is this micro-fix going to be on next updates? If so, I wouldn't worry about upgrading..

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: NGUI and Flash platform
« Reply #6 on: February 23, 2014, 06:00:15 PM »
Yup it's already in the Pro repository. It's a part of 3.5.2.

vicenterusso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: NGUI and Flash platform
« Reply #7 on: February 23, 2014, 06:38:23 PM »
Yup it's already in the Pro repository. It's a part of 3.5.2.

Thank you! I have built every example scene on NGUI folder, and here is the results: Everything worked, except:
Example 0
Example 12
Tutorial 8
Tutorial 9
Tutorial 10
Tutorial 11

All of then, related with inputs. We know that Flash is not supported on future 5.x versions, and a lot of features doesn't work, including Input things: "UnityGUI classes that require text input", according this url: Flash: What is and is not supported. So my question is: is there any workaround for input related things? My actual project doesnt need them, but it's nice to have it here on forum for future users.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: NGUI and Flash platform
« Reply #8 on: February 24, 2014, 01:56:32 PM »
Unity never finished the Flash implementation, so no. Input.inputString doesn't work on Flash.