Change Texture Offset of Held Object With VRC Menu

Intro

  • This seems like a very common and basic thing to want to do!

Summary of Problem

  • I have a character that holds a placard (non-skinned .obj attached to hand)
  • They have 10 texts for the placard to display on a neat texture strip
  • Texture offsets in X direction by steps of 0.1 show the next thing on the placard
  • I want to have a VRC menu control the messages I show

Things I’ve tried/considered

  • separate objects for each placard message: too inefficient

  • an integer parameter controlling animations that set the offset: refuses to work (strange and buggy)

  • writing a shader: vrc diffuse is guaranteed to be loaded by everyone and I can accomplish what I want just changing the texture offset

  • shape keys: second skinned mesh with extra verts for each message is inefficient if it even works

  • GitHub - BirdiePeep/VRCAvatarActions: Unity script for creating VRChat avatar 3.0 content faster and easier.”: creates VRC menus that directly edit (some) object properties. Was hoping to modify this to access the texture offset in the mesh renderer component

  • coding the UV vertex coordinates: seems like a more tedious option than the others

  • read the VRC menu integer parameter into a script that changes the offset: A quick search didn’t yield specific documentation or tutorials

I write here having scoured the net and having a lot of experience with 3d and programming but I know next to nothing about unity+c# specifically.
I’m not enthusiastic about either and just want to make a nice avatar…
Any solutions or documentation?

I may have missed smthn dumb and will leave some updates.

thank you!

Never mind, fixed the issue.

The set up for this is the exact same as making an object appear/disappear!
Look up a tutorial on that if you don’t know!

Instead of having the animation check/uncheck the visibility of the object,
you have the animation modify the texture coord.

This is exactly how I had it set up, but my pitfall was dragging the object into
the scene and making the animations for it before parenting it to the the avatar.
drag in the held object and create all the animations AFTER parenting it to whatever you want to parent it to, or else the animations will point to the wrong thing and not work!