Implemented Animation Clip asset and animation controller #410
|
@ -87,6 +87,7 @@ namespace SHADE
|
||||||
animClip->name = newAssetName;
|
animClip->name = newAssetName;
|
||||||
animClip->firstIndex = firstIndex;
|
animClip->firstIndex = firstIndex;
|
||||||
animClip->lastIndex = lastIndex;
|
animClip->lastIndex = lastIndex;
|
||||||
|
animClip->animRawDataAssetId = SHResourceManager::GetAssetID<SHRawAnimation>(rawAnimation).value_or(0);
|
||||||
SHAssetManager::SaveAsset(containerAsset->id);
|
SHAssetManager::SaveAsset(containerAsset->id);
|
||||||
|
|
||||||
// Close
|
// Close
|
||||||
|
|
|
@ -370,7 +370,7 @@ namespace SHADE
|
||||||
loadedAssetData.emplace_back(assetId);
|
loadedAssetData.emplace_back(assetId);
|
||||||
return resourceHub.Create<ResourceType>
|
return resourceHub.Create<ResourceType>
|
||||||
(
|
(
|
||||||
LoadOrGet<SHRawAnimation>(assetId), // TODO: Wrong, we need to grab the parent asset's ID
|
LoadOrGet<SHRawAnimation>(assetData.animRawDataAssetId),
|
||||||
assetData.firstIndex,
|
assetData.firstIndex,
|
||||||
assetData.lastIndex
|
assetData.lastIndex
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue