|
Is there a way to manually invoke the LayerMask field in an EditorWindow? Like you can with TagField or LayerField...
(comments are locked)
|
|
Hmm, it looks like they forgot to implement it / make it public. I've found that little helperclass which can convert a layer into the corresponding layername and reverse: LayerMask. With this you can try to implement something similar but it won't look like the popup in the inspector. btw. if you add a public var with this type to a script the default inspector will show that popup, but it seems that we can't invoke it manually.
(comments are locked)
|
|
Here is an implementation which looks quite similar to the built in one. But it shows unnamed layers as well due to technical limitations. To prevent too much memory usage is updates the layer name list only every second... but that should be enough. I have an implementation for Unity 3.4 and earlier as well, but the code for that is a lot more hackish. But I can post it if anyone is interested.
(comments are locked)
|
