Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: terri on May 21, 2018, 02:24:22 PM

Title: Set Camera Layer Cull Distance
Post by: terri on May 21, 2018, 02:24:22 PM
Here's an action that does this: https://docs.unity3d.com/ScriptReference/Camera-layerCullDistances.html

In other words, you can set each layer to have it's own cull distance, instead of using the camera's far clipping plane. Can be useful for example if you want to not render small objects at a certain distance while still rendering larger ones, for optimization.
Title: Re: Set Camera Layer Cull Distance
Post by: jeanfabre on May 22, 2018, 02:48:16 AM
Hi,

 Cool thanks :)

 you should put them on the ecosystem, you are doing quite a lot of actions no?

 Bye,

 Jean
Title: Re: Set Camera Layer Cull Distance
Post by: terri on May 22, 2018, 06:48:25 AM
Hi, yes, I should! I always get sidetracked when I come around to learning how to do so though. Is there somewhere I can read up on the steps required?
Title: Re: Set Camera Layer Cull Distance
Post by: 600 on May 22, 2018, 03:54:13 PM
Thanks! This is really great!
Tested and it works in Editor (2017.3), but not on build. Also the action seems to not finish, in editor I had to use NextFrameEvent or Wait to leave state.
Title: Re: Set Camera Layer Cull Distance
Post by: terri on May 22, 2018, 06:22:12 PM
Great! I missed it not working on builds, you're right. Not sure where to go from here to fix this though...

Finishing would be an easy fix, but kinda pointless if this doesn't work on builds.

If anyone has an insight it would be appreciated!

edit:
I also noticed that if you set the distance for another layer, it will first reset all the other ones... so there's that too.
Title: Re: Set Camera Layer Cull Distance
Post by: terri on May 22, 2018, 07:30:53 PM
Ok, I think I got everything fixed! Action updated
Title: Re: Set Camera Layer Cull Distance
Post by: jeanfabre on May 23, 2018, 01:57:00 AM
Hi, yes, I should! I always get sidetracked when I come around to learning how to do so though. Is there somewhere I can read up on the steps required?

Cool :)

1: create a github account, and send me your github id, I'll give you access to the reps
2: download sourcetree or any git client application
3: clone from github the ecosystem repositories
4: open these repositories with Unity ( open them with the right version, when we get to that point, let me know)
5: add your actions in the repositories, and verify that unity doesn't throw errors
6: push your changes back to the online repositories and they will be on the ecoystem.

 Pm me with your email address, I'll help you during the process the first few times :)

Bye,

 Jean
Title: Re: Set Camera Layer Cull Distance
Post by: 600 on May 23, 2018, 08:03:08 AM
Ok, I think I got everything fixed! Action updated
Thanks!