UniVRM
UniVRM copied to clipboard
error CS0246: The type or namespace name 'Vrm10Expression' could not be found (are you missing a using directive or an assembly reference?)
I installed the package in 3 new projects and the one I was working on, I have the perfect installation, the VRM works and all that, but in one script it doesn't and that error appears.
"Assets\Personaje\TestParpadeo.cs(4,7): error CS0246: The type or namespace name 'VRM' could not be found (are you missing a using directive or an assembly reference?)
using UnityEngine;
using System.Collections;
using UniVRM10;
public class TestParpadeo : MonoBehaviour
{
private Vrm10Expression vrmExpression;
void Start()
{
Debug.Log("Iniciando TestParpadeo...");
vrmExpression = GetComponent<Vrm10Expression>();
if (vrmExpression != null)
{
Debug.Log("<color=green>ÉXITO:</color> Componente Vrm10Expression encontrado. El paquete UniVRM está funcionando correctamente.");
StartCoroutine(BlinkOnce());
}
else
{
Debug.LogError("<color=red>FALLO:</color> No se encontró el componente Vrm10Expression. Asegúrate de que este script esté en el objeto raíz del Prefab VRM que se generó al importar.");
}
}
private IEnumerator BlinkOnce()
{
yield return new WaitForSeconds(2.0f);
Debug.Log("Ejecutando parpadeo de prueba...");
vrmExpression.Proxy.SetValue(ExpressionPreset.blink, 1.0f);
yield return new WaitForSeconds(0.1f);
vrmExpression.Proxy.SetValue(ExpressionPreset.blink, 0.0f);
Debug.Log("Parpadeo de prueba finalizado.");
}
}