Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Check object is in layermask unity

public bool IsInLayerMask(GameObject obj, LayerMask layerMask)
{
	return ((layerMask.value & (1 << obj.layer)) > 0);
}
Source by andreberlemont.com #
 
PREVIOUS NEXT
Tagged: #Check #object #layermask #unity
ADD COMMENT
Topic
Name
9+7 =