Is there a way to instantiate a class that derives from MonoBehaviour such as the example bellow without getting the warning: "You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all"
Example:
public class e1506131012test2 : MonoBehaviour
{
Move move = new Move();
//Move move = gameObject.GetComponent<Move>();
void Update()
{
move.Printing();
}
}
public class Move : MonoBehaviour
{
public int number = 5;
public void Printing()
{
print(number);
}
}