Alembic importer question

(Sorry mods, didn’t notice this forum before and posted the same stuff under Animation forum, feel free to remove it!)

==>

I’m trying to write an editor extension that samples Alembic animation vertex positions and writes them to a vertex animation texture.

I’ve managed to import the alembic plugin & file successfully and I can mess around with the time in Alembic Stream Player manually, but for some reason I can’t control the time position with a script.

AlembicStreamPlayer seems to live under UnityEngine.Formats.Alembic namespace, but for whatever reason when I try to include the namespace ( using UnityEngine.Formats.Alembic.Importer; ) I get an error that says that type or namespace “Formats” does not exist in namespace ‘UnityEngine’.

What I don’t understand is how can the plugin itself work, and the stream player also works fine.

namespace UnityEngine.Formats.Alembic.Importer
{
///


/// This component allows data streaming from Alembic files. It updates children nodes (Meshes, Transforms, Cameras, etc.) to reflect the Alembic data at the given time.
///

[ExecuteInEditMode]
[DisallowMultipleComponent]
public class AlembicStreamPlayer : MonoBehaviour, ISerializationCallbackReceiver
{
}

How am I supposed to control this thing with code if I can’t access AlembicStreamPlayer object?

I tried also adding the clip to a timeline and manually moving the timeline by setting PlayableDirector’s time and calling Evaluate() , but that does not seem to change the actual vertex data at all.

br,
Sami

Hello Ookoohko,

The use of asmdef files can prevent access to a namespace, you would need to reference the appropriate Alembic’s asmdef in yours.

Can this be the issue?

Yes, this seemed to be the case indeed - manged to fix this already on my own, but thanks!

br,
Sami