You've already forked UniversalViewer
DanMachi:
-compatibility improvements Core: -simplified object and keyframe serialization -complicated assetbundle loading
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user