βοΈPoll
AnythingWorld.AnythingAnimate.Poll
Declaration
public static void Poll(Action<ModelJson> onProcessFinished, Action<string, string> onProcessFail, Action<string, string, int> onProcessPoll, string id)public static void Poll(Action<ModelJson> onProcessFinished, Action<string, string> onProcessFail, Action<string, string, int> onProcessPoll, string id, int timeout)Parameters
Description
Example
public class MyTestScript : MonoBehaviour
{
string myModelID = "416e797468696e67476f6573";
public void PollMyModel()
{
AnythingAnimate.Poll(
PrintDebugWhenSuccessful,
PrintDebugWhenFail,
PrintDebugWhenPoll,
myModelID);
}
// This function will be invoked if the model has successfully been animated by Animate Anything
public void PrintDebugWhenSuccessful(ModelJson details)
{
Debug.Log("Model successfully animated!");
}
// This function will be invoked if an error was encountered in animating the model
public void PrintDebugWhenFail(string code, string message)
{
Debug.Log("Could not animate model!");
}
// This function will be invoked whenever the model is polled for
public void PrintDebugWhenPoll(string code, string message, int seconds)
{
Debug.Log("Polling for update on my model!");
}
}Last updated
Was this helpful?