playMaker

Author Topic: Actions that don't use variables  (Read 972 times)

matthutton

  • Playmaker Newbie
  • *
  • Posts: 21
Actions that don't use variables
« on: March 19, 2021, 11:05:12 AM »
This might be an easy one. I occasionally run into Actions where a certain field can't be set using a variable. That makes it difficult to use the action in a template. The one that I'm trying to use today is called "Mouse 3D Plan Drag." This is a really useful action, but the camera can't be set using a variable.

Is there a way to use a variable to fill this field?

Gustav

  • Junior Playmaker
  • **
  • Posts: 53
Re: Actions that don't use variables
« Reply #1 on: March 19, 2021, 11:28:47 AM »
Probably the action has to be altered.

I couldn't find an action called Mouse 3D Plan Drag neither in the offical actions nor the Ecosystem.


Regards
Gustav

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Actions that don't use variables
« Reply #2 on: March 19, 2021, 03:41:28 PM »
Hi.
I think its Mouse 3D Plane Drag (Ecosystem)

a part of the info said :

Quote
If camera is not defined, it will use the camera it is attached to or as a last resort the main camera.

Does this not work for you?

Gustav

  • Junior Playmaker
  • **
  • Posts: 53
Re: Actions that don't use variables
« Reply #3 on: March 19, 2021, 03:46:08 PM »
Oh, thanks. I missed the typo there.

It's not working anymore in Unity 2020.3:

Quote
Assets\PlayMaker Custom Actions\Movement\mouse3dPlaneDrag.cs(89,9): error CS0619: 'GameObject.camera' is obsolete: 'Property camera has been deprecated. Use GetComponent<Camera>() instead. (UnityUpgradable)'
« Last Edit: March 19, 2021, 03:56:56 PM by Gustav »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Actions that don't use variables
« Reply #4 on: March 19, 2021, 07:00:33 PM »
Hi.
Oh indeed i think it needs an update, the action is still from 2011

I will try to update tomorrow.

bump pls if its not yet updated by Monday :)

matthutton

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Actions that don't use variables
« Reply #5 on: March 23, 2021, 04:05:01 PM »
Thanks. It's working correctly. I was assuming it would have to be filled in manually. I need to host this on several objects so I won't have it attached to camera.

Thanks for your help!