Quantcast
Viewing latest article 14
Browse Latest Browse All 40

Detect Unity Editor Step Button Click Without Using of Unity's Time Class

Hello! How would I detect use of the Unity editor's "Step" button/menu item/keyboard shortcut without use of Unity's Time class? I have created a custom PlayerLoop to allow for the manual triggering of script Update() methods. I am trying to identify when the Unity Editor's "Step" method has been called to trigger so as to manually trigger Update() methods when that occurs. My custom PlayerLoop does not include Unity's native Initialization.PlayerUpdateTime PlayerLoopSystem, which prevents Unity's Time class from being updated and thus renders variables such as Time.frameCount useless. Currently, I am using Application.isPlaying && !EditorApplication.isPaused to prevent the PlayerLoop from updating scripts when the editor is not playing/paused, but this also prevents the "Step" method from working. For reference, I am seeking to code this in C#, and I am using Unity v2018.2.0b2 with the Scripting Runtime Version ".NET 4.x Equivalent". Any assistance with solving this challenge is much appreciated! Thank you in advance, and be well! - S.

Viewing latest article 14
Browse Latest Browse All 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>