![]() If (monitor.ActualRunTime > monitor.MaxRuntime)ĭebug.LogWarning($"Async operation on GameObject ") Monitor.ActualRunTime += asyncMonitorInterval Int completed = GetCompletedOperationCount() įoreach (OperationMonitor monitor in asyncOperations.Keys) Int running = GetIncompleteOperationCount() Yield return new WaitForSeconds(asyncMonitorInterval) Private IEnumerator MonitorAsyncOperations() Public AsyncCompletionSource NewAsyncOperation(GameObject objectToMonitor)ĪsyncCompletionSource asyncCompletion = new AsyncCompletionSource() StartCoroutine(MonitorAsyncOperations()) Private AsyncCompletionSource allOperationsComplete ĭebug.LogError("Game monitor must be stopped before re-starting") ĪllOperationsComplete = new AsyncCompletionSource() Private Dictionary asyncOperations = new Dictionary() Private static readonly float asyncAlertInterval = 30f Private static readonly float asyncMonitorInterval = 1f ![]() Here's the game monitor class: using System.Collections Yield return new WaitForSeconds(debugWaitTime) ĪsyncCompletionSource = gameMonitor.NewAsyncOperation(gameObject) ĪsyncCompletionSource.SetResult(gameObject) If (!asyncCompletionSource.IsCompletedSuccessfully) we can throw in a delay to watch it render in realtime here Public class ObjectEvents : MonoBehaviourĪsyncCompletionSource asyncCompletionSource Here's the ObjectEvents: using System.Collections I use the Stem Audio Manager asset for Unity, which makes this very easy. ![]() The only thing I do, because of the overall crappiness of the SFX I have, is set per-sample volume and/or pitch. I'm trying to cut down on development time as much as I can and ship a game and see if it's fun. I'm not saying my sound design is great, but I'm not making masterpieces that are in development for years. I've actually had an indepth talk with an audio engineer/sound designer a few months ago and he said something like "oh wow those sounds are good, how did you do it?" and my answer was "I just picked the first sample I could find that worked and put it in the game, I didn't touch it otherwise". I'm not saying sound isn't important, but almost everything in making a game "is important".Īt least the way it is for me, making a game is a race against the time. If it's the most important SFX of the game I might consider tweaking it (say the fire sound of the player's gun), but even then I think it might be a waste of time if you're a small indie. I don't have the time to fiddle with the audio, I'd much rather quickly go through 100 samples and find one that "fits well enough" than to try to take one that doesn't and manipulate it. Honestly, I don't think I've done this even once in the past year or so. You still would have to equalise and compress (limit / maximise) the files according to your sound environment, no? If it's something a bit longer, LUFS is probably more accurate I guess? Peak at 0dB is one way, though this depends on the SFX itself.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |