I still don't know what "disable" means, but I think it's better to put a script on the object (if any) and put the flag "Processing in progress" in order to determine "Unprocessable Time".
bool isActive=false;
public void StartAction() {
if(isActive) return;// Do nothing because it is "Processing"
StartCoroutine (DoAction());
}
Enumerator DoAction() {
isActive = true;
// Something to do with it
yield return new WaitForSeconds (10.0f); // 10 seconds
isActive=false;
}
Why don't you copy the object and put it back in n seconds?
Why don't you record the time you last ran on the static member and implement it in a way that allows you to wait when running the method compared to the current time?
It might be a little complicated when there are multiple objects at once...
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
581 PHP ssh2_scp_send fails to send files as intended
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.