mirror of
https://github.com/maxartz15/VertexAnimation.git
synced 2024-11-12 15:35:30 +01:00
Tmp Fix FixedString32 being zero at runtime.
Tmp Fix FixedString32 being zero at runtime.
This commit is contained in:
parent
a192fed5e9
commit
3e69eb9d84
@ -5,32 +5,24 @@ namespace TAO.VertexAnimation
|
||||
{
|
||||
public class VA_Animation : ScriptableObject
|
||||
{
|
||||
public VA_Animation(int a_maxFrames, int a_frames, int a_fps, int a_positionMapIndex, int a_colorMapIndex = -1)
|
||||
{
|
||||
Data = new VA_AnimationData(this.name, a_frames, a_maxFrames, a_fps, a_positionMapIndex, a_colorMapIndex);
|
||||
}
|
||||
|
||||
public VA_Animation(VA_AnimationData a_data)
|
||||
{
|
||||
this.name = a_data.name.ToString();
|
||||
Data = a_data;
|
||||
}
|
||||
|
||||
public VA_AnimationData Data
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
public VA_AnimationData Data;
|
||||
|
||||
// data.name will be overwritten by this.name.
|
||||
public void SetData(VA_AnimationData a_data)
|
||||
{
|
||||
a_data.name = this.name;
|
||||
Data = a_data;
|
||||
}
|
||||
|
||||
public VA_AnimationData GetData()
|
||||
{
|
||||
// TODO: Fix data name, FixedString32 doesn't transfer from editor?
|
||||
Data.name = new FixedString32(name);
|
||||
return Data;
|
||||
}
|
||||
|
||||
public FixedString32 GetName()
|
||||
{
|
||||
return Data.name;
|
||||
return new FixedString32(this.name);
|
||||
}
|
||||
}
|
||||
}
|
@ -30,7 +30,9 @@ namespace TAO.VertexAnimation
|
||||
{
|
||||
foreach (VA_Animation animation in book.animations)
|
||||
{
|
||||
animationData.Add(animation.Data);
|
||||
// TODO: Fix data name, FixedString32 doesn't transfer from editor?
|
||||
//animation.Data.name = new FixedString32(animation.name);
|
||||
animationData.Add(animation.GetData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ namespace TAO.VertexAnimation
|
||||
{
|
||||
// Copy data.
|
||||
animationDataArray[i] = animationLib.animationLibrary.animationData[i];
|
||||
UnityEngine.Debug.Log("VA_AnimationLibrary added " + animationDataArray[i].name.ToString());
|
||||
}
|
||||
|
||||
// Construct blob asset reference.
|
||||
|
Loading…
Reference in New Issue
Block a user