playMaker

Author Topic: How to change 2D lights  (Read 1162 times)

Daniell_Aven

  • Playmaker Newbie
  • *
  • Posts: 4
How to change 2D lights
« on: November 16, 2020, 09:23:27 PM »
So my game is a 2D isometric game and I'm currently trying to set up the lighting for a day night cycle. The issue is all of the "light" actions only work with 3D lights as far as I can tell. Is there a different way I can go about changing the color and intensity of the lights using playmaker?

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: How to change 2D lights
« Reply #1 on: November 17, 2020, 07:19:00 AM »
Thus far I don't think there's any official 2D Lights category of actions but if you're lucky, you might look into the action that does this in 3D, open it in an editor and eventually look into the scripting manual for Unity and see if you can change the code so as to target a 2D light and also change its properties.

You might also drag the 2D Light component into a Get/Set Properties action and fiddle with it that way.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: How to change 2D lights
« Reply #2 on: November 17, 2020, 11:16:24 AM »
You'll need to do it manually, but it's no big deal, just get the light component and fiddle with properties.
Available for Playmaker work

Daniell_Aven

  • Playmaker Newbie
  • *
  • Posts: 4
Re: How to change 2D lights
« Reply #3 on: November 18, 2020, 10:53:05 PM »
Thus far I don't think there's any official 2D Lights category of actions but if you're lucky, you might look into the action that does this in 3D, open it in an editor and eventually look into the scripting manual for Unity and see if you can change the code so as to target a 2D light and also change its properties.

You might also drag the 2D Light component into a Get/Set Properties action and fiddle with it that way.

Thanks for the response, I just had to use the Set Properties action and it worked!

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: How to change 2D lights
« Reply #4 on: November 19, 2020, 04:39:48 AM »
With these actions, don't forget to do a final check with Linker Wizard.
The reasons are blah blah tech tech blah blah, but it's very important.