Warnings for Tags/Layers
This commit is contained in:
parent
c710d3c38e
commit
00211b3170
3 changed files with 18 additions and 11 deletions
|
@ -44,8 +44,10 @@ public class Mug : MonoBehaviour, IGrabable
|
|||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
//Needs to be on Interactions layer and have the Mug tag to work properly
|
||||
gameObject.tag = "Mug"; //Force gameobject tag
|
||||
if(gameObject.layer != LayerMask.NameToLayer("Interactions"))
|
||||
Debug.LogWarning(gameObject.name+" layer should be set to 'Interactions' to work properly");
|
||||
if(gameObject.tag != "Mug")
|
||||
Debug.LogWarning(gameObject.name+" tag should be set to 'Mug' to work properly");
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue