I have a problem that is related to the Dot Syntax.
I have this condition (I am only pasting the relevant code parts):
using UnityEngine;
using Assets.Code.Interfaces;
using Assets.Code.Scripts;
using System.Collections; // dicionario
using System.Collections.Generic; // dicionario
namespace Assets.Code.States
if (LoadDiagram.diagramaCarga.TryGetValue(gametime, out test)) // Returns true.
{
GUI.Box (new Rect (Screen.width - 650, 275, 50, 25), test.ToString ());
}
And then I have the script where this LoadDiagram is stored:
using UnityEngine;
using Assets.Code.Interfaces;
using System.Collections; // dicionario
using System.Collections.Generic; // dicionario
using System;
namespace AssemblyCSharp
{
public class LoadDiagram
{
public LoadDiagram ()
{
Dictionary<int, float> diagramaCarga = new Dictionary<int, float>();
diagramaCarga.Add(0, 4.2F);
diagramaCarga.Add(1, 4F);
diagramaCarga.Add(2, 3.6F);
diagramaCarga.Add(3, 3.4F);
}
}
}
This connection between scripts is not working, I get this error:
error CS0234: The type or namespace name
Scripts' does not exist in the namespaceAssets.Code'. Are you missing an assembly reference?
In the folder Code, there is a folder named scripts where this LoadDiagram is stored, so I don't know how to fix this. Any help is deeply appreciated.
if (LoadDiagram.diagramaCarga.TryGetValue(gametime, out test))should be in a class within a method.