FluffyFishGames / AdvancedCompany

Repository for my AdvancedCompany mod.
Creative Commons Zero v1.0 Universal
13 stars 15 forks source link

Null returns caused to SoundAPI whilst using AdvancedCompany #130

Open Aeniema opened 8 months ago

Aeniema commented 8 months ago

Whilst AC is on with loaforcsSoundAPI, SoundAPI returns nulls. image

Bongo :3 In discord is loaforcsSoundAPI creator. <3 I've tagged you in the thread.

Aeniema commented 8 months ago

image

With debugging to show what SoundAPI is accessing for reference.

Aeniema commented 8 months ago

@FluffyFishGames Wondering if maybe the AC items could cause the SoundAPI to return empty? Like the headets, flippers etc? Catch you soooon :D

LoafOrc commented 8 months ago

hello, the error advanced company is causing in sound API is the following line in this file:

if (source.playOnAwake && source.enabled) {
                source.Play();

so while I haven't looked at ac's code yet this is my best guess: you are most likely creating an audiosource, then destroying it from awake or at least before start.

this is probably fixable from soundapi's side but you probably should look into that because doing that isn't the smartest idea.

again haven't looked at an ac code so it could be a different issue

LoafOrc commented 8 months ago

happens on the following audiosources, what are you doing to these? image