Playmaker Forum

PlayMaker Help & Tips => Unity Services => Topic started by: Aaddiction on February 27, 2021, 01:39:03 PM

Title: Cannot import NGUI and Playmaker in one project
Post by: Aaddiction 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.
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: djaydino 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;
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: Aaddiction 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.
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: Aaddiction 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.
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: Alex Chouls 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.
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: Aaddiction 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.
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: Alex Chouls 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!
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: Aaddiction 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!
Title: Re: Cannot import NGUI and Playmaker in one project
Post by: Bartec on August 24, 2021, 11:35:06 AM
Hey have the same issue.
cant fix it by myself.

PlayMaker.Actions.TweenColor not working for me.

how can i fix?

regards