DanMachi:

-compatibility improvements
Core:
-simplified object and keyframe serialization
-complicated assetbundle loading
This commit is contained in:
2024-05-10 09:56:39 +02:00
parent c922584d38
commit c05f989384
192 changed files with 79685 additions and 25820 deletions

View File

@@ -1,3 +1,5 @@
using System;
[System.Serializable]
public class KeyframeData
{
@@ -23,4 +25,15 @@ public class KeyframeData
copy.Root = copy.Root.LerpWith(target.Root, amount);
return copy;
}
/// <summary>
/// Call type's constructor with container as parameter
/// </summary>
/// <param name="type">Must derive from KeyframeData</param>
/// <param name="container">Type must accept it as the only constructor parameter</param>
/// <returns></returns>
public static KeyframeData Serialize(Type type, ObjectContainer container)
{
return Activator.CreateInstance(type, new object[] { container }) as KeyframeData;
}
}