Author Topic: NGUITools in 3.7.7 not compatible with Flash?  (Read 2492 times)

breakmachine

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 71
    • View Profile
NGUITools in 3.7.7 not compatible with Flash?
« on: December 09, 2014, 11:10:33 AM »
I'm getting compile errors when building to Flash in NGUITools.cs

Assets/NGUI/Scripts/Internal/NGUITools.cs(118,40): error CS1061: Type `UnityEngine.AudioSource' does not contain a definition for `priority' and no extension method `priority' of type `UnityEngine.AudioSource' could be found (are you missing a using directive or an assembly reference?)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUITools in 3.7.7 not compatible with Flash?
« Reply #1 on: December 09, 2014, 12:11:42 PM »
Unity is not compatible with flash anymore. Neither is NGUI, since it requires 4.5 (or is it 4.3, not 100 % sure).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUITools in 3.7.7 not compatible with Flash?
« Reply #2 on: December 09, 2014, 12:38:14 PM »
For that particular error, just wrap that code in an #if statement:
  1. #if !UNITY_FLASH
  2.                                 source.priority = 50;
  3.                                 source.pitch = pitch;
  4. #endif
Line 116 of NGUITools.cs.

breakmachine

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 71
    • View Profile
Re: NGUITools in 3.7.7 not compatible with Flash?
« Reply #3 on: December 10, 2014, 04:52:22 AM »
Unity has said "We will continue to support our existing Flash customers throughout the 4.x cycle". But they haven't ported the new gui stuff which I fully understand and it's part of the reason why I was choosing NGUI for this project.

#ifdef works for compilation however anchors and button-notification-event-thingy is buggy.
« Last Edit: December 10, 2014, 05:22:49 AM by breakmachine »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUITools in 3.7.7 not compatible with Flash?
« Reply #4 on: December 11, 2014, 08:38:28 AM »
Flash is very limiting in what it supports in Unity. As I recall, delegates are limited as well because Flash can't do reflection. You won't be able to use the full extent of NGUI's features when doing games for Flash. Stick to UIEventListener / UIButtonMessage.