Hi @ll,
I was wondering if it is possible to call a function of a script at every frame, without adding the script as a component to an object.
Cheers,
Stefan
Hi @ll,
I was wondering if it is possible to call a function of a script at every frame, without adding the script as a component to an object.
Cheers,
Stefan
If the method is static, you can call it from anywhere.
public class MyClass
{
public static void DoSomething()
{
// ...
}
}
void Update()
{
MyClass.DoSomething();
}
Thank you for your answer, but than I would have to add another script with the Update()-function to some object.
Is there a way to call a function without adding any script as a component to an object like a cube or a camera, etc. ?
Many thanks,
Stefan