Question by
Freddie_Tuke · Apr 05, 2021 at 04:57 PM ·
layermask
How to assign a layermask variable using code?
So I know I could just make it public but I would like to keep it private so is there a way of assigning a layermask using code. something like
someMask = layer.someLayer
Hope you know what I mean Thanks
Comment
Answer by KoenigX3 · Apr 05, 2021 at 05:34 PM
Are you thinking of LayerMask.GetMask?
Ah thought there would be something like that. Worked great!
Your answer
Follow this Question
Related Questions
Is it possible to access Layer visibility and lock status via script? 1 Answer
Get collision mask from one Layer 0 Answers
How the bullet does not pass through the object? c# 1 Answer
Overlapsphere issue with laymask 0 Answers
How do I blur a part of the screen only? (Not being selective of objects, but a visual part of it) 1 Answer