How to "edit the .uplugin file" to enable Asset Reflection in pre v26.00 projects?

The Creator Portal Patch Notes say to edit the .uplugin file but don’t explain how. The “Exposing Assets in UEFN to Verse” docs page doesn’t even mention .uplugin. I don’t see .uplugin instructions anywhere in any UEFN docs or Forums actually.

Could someone explain how to do this? Also, Epic, please add this to the docs?

I found my MyProject.uplugin file in File Explorer and opened up in Notepad but I’m scared to touch it. It looks like this:


{
	"FileVersion": 3,
	"Version": 1,
	"VersionName": "1.0",
	"FriendlyName": "Sprigs_MainGame",
	"Description": "",
	"Category": "Other",
	"CreatedBy": "",
	"CreatedByURL": "",
	"DocsURL": "",
	"MarketplaceURL": "",
	"SupportURL": "",
	"VersePath": "/localhost/Sprigs_MainGame",
	"EnabledByDefault": false,
	"CanContainContent": true,
	"CanContainVerse": true,
	"IsBetaVersion": false,
	"IsExperimentalVersion": false,
	"Installed": false,
	"ExplicitlyLoaded": true,
	"ValkyrieSettings":
	{
		"defaultMap": ""
	},
	"builtInAutoActivate": false
}

I’m so hyped to use images in my Verse UI, so I really appreciate any help. Thanks!

2 Likes

Hey @Fresnella!

Add the line:

"EnableVerseAssetReflection": true,
5 Likes

Yayyy thank you, @AxelCapek ! I figured it was something like that, I just didn’t know the exact wording. Where did you find this info, btw?

I’ve been wanting texture_block for sooo long :heart_eyes: I have a lot of plans for it.

1 Like

Oh also does it matter where I add that line? Do I put it last?

I compared a new project made in 26.00 vs my old projects and noticed this line was different. Edit: you can add the line under “EnabledByDefault”, thats where it is in new projects.

1 Like

Ohhhh ahaha well that makes sense… :laughing:

1 Like

Omg @AxelCapek this is so sick! This is way more functionality than I hoped for.

texture_block<native><public> := class(widget):
            # The image to render. Used only during initialization of the widget and not modified by SetImage.
            DefaultImage<native><public>:texture

            # Tinting applied to the image. Used only during initialization of the widget and not modified by SetTint.
            DefaultTint<native><public>:color = external {}

            # The size this widget desired to be displayed in. Used only during initialization of the widget and not modified by SetDesiredSize.
            DefaultDesiredSize<native><public>:vector2 = external {}

            # The horizontal tiling option. Used only during initialization of the widget and not modified by SetTiling.
            DefaultHorizontalTiling<native><public>:image_tiling = external {}

            # The vertical tiling option. Used only during initialization of the widget and not modified by SetTiling.
            DefaultVerticalTiling<native><public>:image_tiling = external {}

            # Sets the image to render.
            SetImage<native><public>(InImage:texture):void

            # Gets the image to render.
            GetImage<native><public>():texture

            # Sets the tint applied to the image.
            SetTint<native><public>(InColor:color):void

            # Gets the tint applied to the image.
            GetTint<native><public>():color

            # Sets the size this widget desired to be displayed in.
            SetDesiredSize<native><public>(InDesiredSize:vector2):void

            # Gets the size this widget desired to be displayed in.
            GetDesiredSize<native><public>():vector2

            # Sets the tiling option when the image is smaller than the allocated size.
            SetTiling<native><public>(InHorizontalTiling:image_tiling, InVerticalTiling:image_tiling):void

            # Gets the tiling option.
            GetTiling<native><public>():tuple(image_tiling, image_tiling)

We can change the image and its tint/size/tiling at runtime??? That’s like, actual gameplay not just decorative :open_mouth:

1 Like

You should try it out before being hyped :

  • size is a fixed vector2, meaning that it could not use the anchors / alignment values provided in the widget
  • tiling lets you only set repeat or none (which is very limited compared to what you have in other ui builders), thinking about fill/cover/contain for example
  • Yay. We can animate the tint!

I think this is a big step still because we should now be able to display dynamic text that should be aligned with our UI images. Which was way harder to do before.

1 Like

Ok ya true there are still def some limitations. :laughing:

I’m most excited about using my custom images as backgrounds for Verse UI text, without the image losing alignment with the text if the player changes their HUD scale in their Fortnite settings. That was a big problem before. This update came just in time, because I was about to try sticking my textures to the screen using a material and a Cinematic Sequence Device :skull:

Tint is fun and I’m trying to think of ways to use it. Wish we had OnHover for the UI button instead of just OnClick. Then if you’re using an image as the background for your button, you could change the tint of that image when the player hovers over the button. Still could do some interesting things with OnClick though.

1 Like

Hi! Thanks for calling this out. There should have been more info included:

Enabling Asset Reflection in Existing UEFN Projects
With the release of 26.00, the ability to expose assets from UEFN to Verse is enabled by default for all newly created UEFN projects. For any of your projects created before 26.00, you will need to enable this feature by following these steps:

  1. Close your project in UEFN.
  2. Locate the .uplugin file in the project directory.
  3. Open the .uplugin file in a text editor.
  4. Find the property EnableVerseAssetReflection and set it to true.
  5. If no such property is present, add the following line under VersePath:
    “EnableVerseAssetReflection” : true,
  6. Save the .uplugin file.
  7. Re-open your project in UEFN.
1 Like

Thank you so much, @summergrrrl , this is so detailed! Good to know for future patches, too. I probably could have figured it out myself the way Axel did but it’s always nice to have things written out. :green_heart:

Texture_block was released at a perfect time for me because I’m working on my NPC dialog system. I’ve been painting a bunch of little portraits. :heart_eyes: :potted_plant:
NPCDiaFennelGIF1
.

6 Likes

Omg, I love it!

1 Like

Thanks! I took an online class for drawing humans because I didn’t know how :laughing: I’m going to post my snippet soon too.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.