Assuming I have declare a Unity asset “HMD”, which contains 2 directories, “Scripts” and “Tests”.
(This project has been uploaded to https://github.com/hpvdt/HMD-Air/blob/d74eb803f933b6a13de33f89468bc70def1126c9/Assets/HMD/Tests/PickleSuite.cs, to demonstrate the error)
Under “Scripts” I have a class called “Pickle”:
namespace HMD.Scripts.Pickle
{
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
public class Yaml
{
Under “Tests” I have a testing class called “PickeSuite”:
using NUnit.Framework;
namespace HMD.Tests
{
using Scripts.Pickle;
using Scripts.Streaming.VCap;
public class PickeSuite
{
// A Test behaves as an ordinary method
[Test]
public void PickeSuiteSimplePasses()
{
...
Upon compilation, it is reported that all namespaces under Scripts cannot be found:
1>PickleSuite.cs(5,11): Error CS0246 : The type or namespace name 'Scripts' could not be found (are you missing a using directive or an assembly reference?)
1>PickleSuite.cs(6,11): Error CS0246 : The type or namespace name 'Scripts' could not be found (are you missing a using directive or an assembly reference?)
what’s the cause of this? How to make the namespace visible?C