This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
EveUnity/packages/org.gamecult.eve.unity-scene/Tests/Editor/EveUnityLightningEffectTests.cs
2026-07-12 01:27:17 +01:00

32 lines
1.1 KiB
C#

using NUnit.Framework;
using UnityEditor;
using UnityEngine;
namespace GameCult.Eve.UnityScene.Tests
{
public sealed class EveUnityLightningEffectTests
{
[Test]
public void GraduatedLightningBundleLoadsWithoutAetheriaAssemblies()
{
const string root = "Packages/org.gamecult.eve.unity-scene/Runtime/Effects/Lightning/";
var compute = AssetDatabase.LoadAssetAtPath<ComputeShader>(root + "Lightning.compute");
var material = AssetDatabase.LoadAssetAtPath<Material>(root + "Lightning.mat");
var host = new GameObject("lightning-import-proof");
try
{
var effect = host.AddComponent<LightningCompute>();
effect.ComputeShader = compute;
effect.RenderMaterial = material;
Assert.That(compute, Is.Not.Null);
Assert.That(material, Is.Not.Null);
Assert.That(effect.GetType().Assembly.GetName().Name, Is.EqualTo("GameCult.Eve.UnityScene"));
}
finally
{
Object.DestroyImmediate(host);
}
}
}
}