• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

VaM 1.x Plugin Creation -> How to display image (thumbnail) in plugin ui?

Threads regarding the original VaM 1.x

bill_prime

Well-known member
Featured Contributor
Joined
Feb 24, 2021
Messages
488
Solutions
3
Reactions
2,033
How to load a preview image / thumbnail from a .png file in to the plugin interface?
Paging @Chokaphi for Decal maker but that code seems a bit more complicated than what I am trying to do :(
 
Standard Unity UI. You need to code a system that selects the image, creates a UI component with that image ( which implies creating a texture 2D etc... ) and add it to the plugin UI.
 
Upvote 0
Standard Unity UI. You need to code a system that selects the image, creates a UI component with that image ( which implies creating a texture 2D etc... ) and add it to the plugin UI.

I am creating the Texture2D but don't know how to actually display it in a VAM plugin UI
Do I use Image, RawImage, Texture2D?
I have tried CreateUIElement with RawImage.transform but that doesn't display anything.
 
Upvote 0
You're going blind into this? 'coz you're gonna spend ages if so :p
You should use Unity to look at the standard UI structure and look at Unity's documentation, everything is documented for such standard things.

What I did when I wanted to create custom components was to fire up Unity, create my components manually with like a "proto" version. Then check what were the components and recreated them through code.
 
Upvote 0
You're going blind into this? 'coz you're gonna spend ages if so :p
You should use Unity to look at the standard UI structure and look at Unity's documentation, everything is documented for such standard things.

What I did when I wanted to create custom components was to fire up Unity, create my components manually with like a "proto" version. Then check what were the components and recreated them through code.

That sounds incredibly easier than coding blindly and reloading in VAM to see if it worked lol.
 
Upvote 0
Back
Top Bottom