Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Bug: Parameter not getting set on a Collection

I'm seeing an odd bug with attempting to set a parameter on a collection.

I've created a new Material Parameter Collection called SelectionHighlightCollection. It holds 1 scalar parameter, LineWidth.

I'm trying to modulate that from my custom HUD object' blueprint. Inside my HUD's tick function, I call a custom BP event on my HUD, SetSelectionLineWidth, that then calls SetScalarParameterValue.

The editor still passes in 'None' as the ParameterName FName param when it calls UMaterialParameterCollectionInstance::SetScalarParameterValue(), fails to set the parameter at all, and gives me warnings that it was called with invalid ParameterName 'None' even though it's clearly showing it set to LineWidth in the BP.

However, this bug disappears if I drag off of the name and create a literal FName called LineWidth.

See the attached:

alt text

Product Version: Not Selected
collection_bug.png (142.4 kB)
more ▼

asked Nov 07 '14 at 05:42 PM in Bug Reports

avatar image

274 33 49 66

avatar image Doug E ♦♦ STAFF Nov 07 '14 at 06:24 PM

Hey Mothership.Entertainment-

Where are you calling SetScalarParameterValue and what is being given as the FName in the call?

avatar image MSE_Taliesin Nov 07 '14 at 06:30 PM

The blueprint you see in the upper right gets triggered inside every frame of our HUD's tick function (we turned ticking on for our HUD subclass). So every HUD tick, we end up calling that Event Set Selection Line Width, and as you can see from the screenshot of the blueprint itself, we're passing in 'LineWidth' as the parameter, which it auto-selected for us ... but somehow isn't getting translated properly when the game runs.

Again, I can work around it easily enough by making this a literal FName param, but this seems like a clear bug so I wanted to give you guys a heads-up about it.

avatar image Doug E ♦♦ STAFF Nov 07 '14 at 06:38 PM

Looking at the code along the bottom, it seems as though the name is not getting passed in when SetScalarParameterValue is being called in the code. To help investigate what is causing this I'm wondering where this function is being called from inside the code.


Doug Wilson

avatar image MSE_Taliesin Nov 07 '14 at 06:59 PM

Doug, the code is basically what's shown below. Like I said, inside my Tick(), I'm calling a custom event SetSelectionLineWidth and passing in the line width as a float, which then calls Set Scalar Parameter Value as you can see in the blueprint screenshot above (from the HUD's blueprint), and relying on the defaulting of the "Parameter Name" param on that function to default to 'LineWidth' like it says it's doing.

 void AOCHUD::Tick( float deltaSeconds )
     Super::Tick( deltaSeconds );

     float line_width = /* a bunch of code to calculate the width */;
     SetSelectionLineWidth( line_width ); // Call my own BP event!
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first

Hey Mothership.Entertainment-

It seems this was a known issue that was addressed with the 4.5.1 hotfix that went out recently and should be fixed with the current latest update to the engine.

more ▼

answered Nov 12 '14 at 05:16 PM

avatar image MSE_Taliesin Nov 12 '14 at 05:28 PM

BOOM. Like a boss!

Have I mentioned that you guys rock today?

You guys rock.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question