Answer the question
In order to leave comments, you need to log in
AudioClip - Object Reference not set to an instance of an object, how to fix?
I tried to get the WWW object from a link to an audio file on the system.
Next, I tried to assign the AudioClip field from WWW to a new variable, which I then tried to produce:
public void PlayAudio(CommandArgs args)
{
WWW wwwData = new WWW("file:///E:/Windows32/COMMON/steamapps/common/Unturned/Unturned_Data/Managed/mods/clip.mp3");
AudioClip audio = wwwData.audioClip;
AudioSource.PlayClipAtPoint(audio, args.sender.position);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question