This way, I could just check for Everything besides layers (so when I add or remove layers, I don’t have to change any layermask references), but I’m not sure if it’s possible to do this with FC currently?
It would be very useful for testing against Everything besides a couple of layers, even after more layers have been added to the project (Everything except Enemies and Player, for instance, and at a later date, more layers such as Walls, Floors, Terrain may be added).
I have attached for you here a package which contains some LayerMask method extensions (like Add/Remove to/from LayerMask as well as a ContainsLayer check). Please import the package and the extensions methods will show up under “LayerMask/Methods/Extensions” in the node browser for you to use. You can for example drag and drop a LayerMask output port as normal and under “LayerMask/Methods/Extensions” all the new methods will show up to be used as nodes.
Sorry for the delay, been dying to try it for the last week and a half and needed to give it a good test! Works AWESOME, I used this to take a layermask Nothing and make it everything besides Water:
Not sure if this is the best way of doing it, but it works for me! This means I never have to worry about adding new layers and going through all of my old layermasks, I can just remove the layers I need excluding at the time. Thanks so much!