playMaker

Author Topic: AddComponent.cs is obsolete  (Read 2232 times)

broesby

  • Playmaker Newbie
  • *
  • Posts: 14
AddComponent.cs is obsolete
« on: August 30, 2016, 11:28:09 AM »
Hi Jean and others

I have a potentially big problem. I am making a short film for a wedding this weekend. I am afraid I started with an alder project and forgot to update playmaker. I am using version 1.7.7 f6. Unity is 5.3.5.

I get this error when I try to build:


Assets/PlayMaker/Actions/AddComponent.cs(56,88): error CS0619: `UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent(UnityEngine.GameObject, string, string)' is obsolete: `Method is not meant to be used at runtime. Please, replace this call with GameObject.AddComponent<T>()/GameObject.AddComponent(Type).'

I guess it would solve as soon as I update Playmaker, but I am really afraid to do it  risking to loose all my work so close to the BIG DAY  ::) I remember I once had big problems updating another project to a newer version of playmaker.

I of course backed up the whole project folder to another drive.

But I am still afraid if an update would somehow risk breaking the project somehow by putting something inside Unity in a way that I cannot go back to where I am now.

I would rather be sure and run it from the editor than risking losing many many hours of work...

I am not so certain of my Unity and Playmaker skills that I dare risking this without asking first...???

Would it be safe to update and will it work building afterwards??

.. and is the project folder backed up to another drive a failsafe backup that I can go back to if something goes wrong???

Sry for the noob question..

Best wishes, Jesper Broesby  ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: AddComponent.cs is obsolete
« Reply #1 on: August 31, 2016, 04:09:08 AM »
Hi,

 ouch. Indeed only 1.8 and up is working for Unity 5.3 and up, so you'll have to stick with a previous version of Unity or upgrade to 1.8.

 make a backup and do the upgrade of PlayMaker on a copy of your project, and see how it performs.

 if you project was previousl in Unity 4, it will be tricky, you should first update playmaker to 1.8 inside Unity 4 and then upgrade the project to Unity 5.

 Let me know how it goes.

 Bye,

 Jean

broesby

  • Playmaker Newbie
  • *
  • Posts: 14
Re: AddComponent.cs is obsolete
« Reply #2 on: August 31, 2016, 06:57:36 AM »
Thx Jean,..

I will try as soon as the project is finished and I have made a recording (video) of theit as a backup .... I am paranoid I guess  :-\

Just to be certain... Is the backed up project totally SAFE? I tested it now. It works as expected.... But I mean.. There is no way that the Playmaker update changes something "deeper" than project wide... I mean inside Unity it self...?? I guess not.... but better safe than sorry  ::)

broesby

  • Playmaker Newbie
  • *
  • Posts: 14
Re: AddComponent.cs is obsolete
« Reply #3 on: September 01, 2016, 06:08:08 PM »
Plz,...  ;) Is the backup totally safe if it works already??

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: AddComponent.cs is obsolete
« Reply #4 on: September 02, 2016, 01:42:18 AM »
Hi,

 If a project works then I guess it's ok to keep it as a backup yes. The question is more wether it's a Unity 4 project or Unity 5 project and wether you want to update at some point to catch up with Unity and PlayMaker updates.

Bye,

 Jean