Getting error on Invoke Why?


Code looks fine.

Do you have a:
using System;

1 Like

Welcome to the community @Dule
Does your class inherit from MonoBehaviour? This Invoke is a method on MonoBehaviour and is only available if you inherit from MonoBehaviour.

It also looks like your class is called NewBaseType which Unity is not going to like once the Invoke issue is fixed. Unity wants the MonoBehaviour to have the same name as the file it is in. Your file is called BallHendler.cs but the class is called NewbaseType

2 Likes

That was the problem. Somehow I didn’t have MonoBahaviour on the beginning of class. Now I put it back and everything working good.
Thank you for support @bixarrio @MichaelP

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms