Graduate lightning presentation into EveUnity
This commit is contained in:
parent
d1240f9fab
commit
d6bdeb8fe9
20 changed files with 931 additions and 2 deletions
|
|
@ -0,0 +1,32 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in a new issue