playMaker

Author Topic: [Solved] Set Property Unity 5  (Read 3069 times)

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
[Solved] Set Property Unity 5
« on: May 23, 2015, 03:50:16 AM »
Hi,

In Unity 5, I was trying to use a button set property and enable a camera. But it seems as if Unity 5 is missing actions in Set Property. Is there another way to do this?
« Last Edit: May 23, 2015, 05:48:17 PM by Prototype_6492 »

SpencerPDX

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Set Property Unity 5
« Reply #1 on: May 23, 2015, 11:54:04 AM »
Not sure if this is helpful, but I happened to see this in the latest Playmaker Readme:

"NOTE: Unity 5 no longer supports component shortcuts in GameObject (e.g., guiTexture, renderer etc.).
If you used these properties in Get Property or Set Property actions you will need to re-select the property!
Problem: If you dragged a GameObject into Set Property and navigated into the guiTexture property, the resulting path is no longer valid in Unity 5.
Solution: Drag the component itself into the property field (not the GameObject)."

There's also an action called Cut to Camera that I've used for switching between cameras. Could be a useful alternative.

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: Set Property Unity 5
« Reply #2 on: May 23, 2015, 03:27:18 PM »
I thought Cut To Camera might work. But when it cuts to one, I can't cut it back to the other..

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: Set Property Unity 5
« Reply #3 on: May 23, 2015, 03:38:40 PM »
Alright, I got it working..

Easiest way it seems to do this, is by using the Activate Game Object action and setting your cameras... Well for me at least.

SpencerPDX

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Set Property Unity 5
« Reply #4 on: May 23, 2015, 04:32:07 PM »
The way I've used Cut To Camera was to have a bunch you could jump between by pressing keys 1-5; you can see it in action here if you like:

https://dl.dropboxusercontent.com/u/3329542/Marmoset_Street/Marmoset_Street.html

It was a while back, and still in Unity 4. Just took another look and the way I had to set it up was:

* Create your cameras (in this case five of them)
* Keep all camera objects active (keep the box next to their names checked in the scene) but deactivate all but one of their camera components, i.e. uncheck the box next to "Camera" in all but one.
* Set up keystrokes to activate Cut To Camera actions pointing at each of your cameras.
* Can't remember if it's important, but looking in the old project I see that in all these Cut To Camera actions I have "Make Main Camera" checked.

Haven't tested this in Unity5, so hopefully this approach still works. Setting up another similar project now.Originally I activated game objects too, but I remember having some issues with that approach, and this ended up being cleaner and more reliable.

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: [Solved] Set Property Unity 5
« Reply #5 on: May 23, 2015, 05:48:31 PM »
Thanks man!

SpencerPDX

  • Playmaker Newbie
  • *
  • Posts: 22
Re: [Solved] Set Property Unity 5
« Reply #6 on: May 23, 2015, 08:30:28 PM »
No problem!