komornik111
Guest
Posts: 0
|
Post by komornik111 on Jan 19, 2021 8:52:14 GMT
Hey, could someone tell my why it doesnt work? console error: Assets\Opsive\UltimateCharacterController\Scripts\Character\foot.cs(4,7): error CS0246: The type or namespace name 'DarkTonic' could not be found (are you missing a using directive or an assembly reference?) using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DarkTonic.MasterAudio;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
MasterAudio.PlaySound(fotstep_grass1);
}
// Update is called once per frame
void Update()
{
}
}
|
|
|
Post by DarkTonic Dev on Jan 19, 2021 17:21:02 GMT
Then you are in the wrong assembly. Notice that your script lives in Assets, not Assets/Plugins, so it can't reference Master Audio which lives in Assets/Plugins. This is because Opsive has chosen to put code in Assets, which is actually incorrect per Unity. Assets/Plugins is for code that "doesn't change", i.e. Plugin code. You can move the Opsive code into Plugins or you can place your script in a folder that can reference Assets/Plugins. Consult this page for more clarity: docs.unity3d.com/Manual/ScriptCompileOrderFolders.html
|
|