playMaker

Author Topic: Cannot import NGUI and Playmaker in one project  (Read 215 times)

Aaddiction

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Cannot import NGUI and Playmaker in one project
« on: February 27, 2021, 01:39:03 PM »
For some reason I started getting errors when I import NGUI and Playmaker in one project similar to:
Code: [Select]
Assets\PlayMaker\Actions\Tween\Editor\TweenRotationEditor.cs(40,36): error CS1061: 'TweenRotation' does not contain a definition for 'fromOptions' and no accessible extension method 'fromOptions' accepting a first argument of type 'TweenRotation' could be found (are you missing a using directive or an assembly reference?)
Yes, there seems to have duplicate scripts, but when I start to delete the ones in NGUI folder I end up deleting the entire NGUI package following script after script error. What can be the issue?

Only NGUI or only Playmaker works fine.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5946
    • View Profile
    • jinxtergames
Re: Cannot import NGUI and Playmaker in one project
« Reply #1 on: February 27, 2021, 02:11:43 PM »
Hi.
Can you make a backup and try to remove the tween folder?

Something else you could try is in the TweenRotationEditor.cs Script change line 16 :

Code: [Select]
        private TweenRotation tweenAction;To
Code: [Select]
        private PlayMaker.Actions.TweenRotation tweenAction;

Aaddiction

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: Cannot import NGUI and Playmaker in one project
« Reply #2 on: February 27, 2021, 03:35:56 PM »
You mean in Playmaker foler? Yes, I can but then Playmaker is not working. And it's not just that script. Strange because all my project are PM + NGUI and haven't had a problem so far.

Aaddiction

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: Cannot import NGUI and Playmaker in one project
« Reply #3 on: February 27, 2021, 05:29:42 PM »
After some testing it seems latest Playmaker versions have duplicate scripts with NGUI - Tween position, Tween Scale, Tween Color editor scripts.
« Last Edit: February 27, 2021, 05:37:49 PM by Aaddiction »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3889
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Cannot import NGUI and Playmaker in one project
« Reply #4 on: February 28, 2021, 12:04:57 AM »
It looks like NGUI doesn't use namespaces and declares TweenPosition etc. in the global namespace. Import the attached package and it should work with NGUI.

Aaddiction

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: Cannot import NGUI and Playmaker in one project
« Reply #5 on: February 28, 2021, 03:15:43 AM »
Thank you a lot! This worked.

However, now I have the following errors in the NGUI actions I'm using for Playmaker.

Code: [Select]
Assets\AT1 Ngui Actions\Scripts\nguiTweenColor.cs(21,21): error CS0426: The type name 'Style' does not exist in the type 'TweenColor'
Assets\AT1 Ngui Actions\Scripts\nguiTweenColor.cs(22,21): error CS0426: The type name 'Method' does not exist in the type 'TweenColor'
Assets\AT1 Ngui Actions\Scripts\nguiTweenPosition.cs(22,24): error CS0426: The type name 'Style' does not exist in the type 'TweenPosition'
Assets\AT1 Ngui Actions\Scripts\nguiTweenPosition.cs(23,24): error CS0426: The type name 'Method' does not exist in the type 'TweenPosition'
Assets\AT1 Ngui Actions\Scripts\nguiTweenPositionAsGameobjects.cs(22,24): error CS0426: The type name 'Style' does not exist in the type 'TweenPosition'
Assets\AT1 Ngui Actions\Scripts\nguiTweenPositionAsGameobjects.cs(23,24): error CS0426: The type name 'Method' does not exist in the type 'TweenPosition'
Assets\AT1 Ngui Actions\Scripts\nguiTweenRotation.cs(20,24): error CS0426: The type name 'Style' does not exist in the type 'TweenRotation'
Assets\AT1 Ngui Actions\Scripts\nguiTweenRotation.cs(21,24): error CS0426: The type name 'Method' does not exist in the type 'TweenRotation'
Assets\AT1 Ngui Actions\Scripts\nguiTweenScale.cs(21,21): error CS0426: The type name 'Style' does not exist in the type 'TweenScale'
Assets\AT1 Ngui Actions\Scripts\nguiTweenScale.cs(22,21): error CS0426: The type name 'Method' does not exist in the type 'TweenScale'


I've reached to the publisher, but not sure if he'll answer.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3889
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Cannot import NGUI and Playmaker in one project
« Reply #6 on: February 28, 2021, 02:47:54 PM »
You should be able to fix this yourself by adding
Code: [Select]
PlayMaker.Actions. in front of TweenColor etc.

Double click the error to open in the default code editor. Then add PlayMaker.Actions. in front TweenColor etc.

So
Code: [Select]
TweenColor becomes
Code: [Select]
PlayMaker.Actions.TweenColor
Let me know how it goes!
« Last Edit: February 28, 2021, 02:49:34 PM by Alex Chouls »

Aaddiction

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: Cannot import NGUI and Playmaker in one project
« Reply #7 on: February 28, 2021, 04:46:59 PM »
I was able to fix with a help from a friend. There was also issue with tooltips. Thank you a lot!