0
Need More Information

AOT Pre-Build Error - could not be found in the global namespace (are you missing an assembly reference?)

DClayne 6 months ago updated by Lazlo Bonin (Lead Developer) 6 months ago 1

Assets\Plugins\Ludiq\Ludiq.Core\Generated\AotStubs.cs(3732,12): error CS0400: The type or namespace name 'CheckBoxesState' could not be found in the global namespace (are you missing an assembly reference?)



using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CheckBoxesState : MonoBehaviour
{
public List checkboxes = new List();
public List checkboxesState = new List();
// Start is called before the first frame update
void Start()
{
if(checkboxes.Count == 0)
return;
checkboxes.ForEach((c)=>
{
checkboxesState.Add(c.isOn);
} );
for (int i = 0; i < checkboxes.Count; i++)
{
int localI = i;
checkboxes[i].onValueChanged.AddListener((s)=> {checkboxesState[localI] = s;});
}
}
}





Error:
Assets\Plugins\Ludiq\Ludiq.Core\Generated\AotStubs.cs(3732,12): error CS0400: The type or namespace name 'CheckBoxesState' could not be found in the global namespace (are you missing an assembly reference?)

Bolt Version:
1.4.11
Unity Version:
2019.3.0.f6
Platform(s):
Scripting Backend:
IL2CPP
.NET Version (API Compatibility Level):
.NET 4.x
Need More Information

Hi DClayne,

Thanks for the report and sorry you're experiencing this issue.

Is there a chance that your CheckBoxesState class is declared in an assembly that is not accessible at runtime? For example, is it placed in an "Editor/" folder?

If so, Bolt cannot generate stubs for it, as it cannot be used in builds.