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"

Set material node does nothing on MaterialBillboardComponent

I want to use a Dynamic Material Instance, or at least change the material of a Sprite inside a MaterialBillboardComponent. The SetMaterial node from PrimitiveComponent doesn't do anything, and neither does this: alt text (this does not work to change any of the other parameters either, like Base Size)

Is there any way to change the material used in a MaterialSpriteElement from BP/C++ ?

Product Version: Not Selected
more ▼

asked Oct 26 '14 at 04:20 PM in Blueprint Scripting

avatar image

188 24 31 144

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

This does what I want:

 void UMaterialBillboardComponent::SetMaterial(int32 ElementIndex,class UMaterialInterface* Material)
     if (Elements.IsValidIndex(ElementIndex))
         Elements[ElementIndex].Material = Material;
more ▼

answered Oct 26 '14 at 06:04 PM

avatar image

188 24 31 144

avatar image n4rc0 Dec 20 '14 at 11:54 PM

Do you also know how to do it in blueprint? This caused me today a huge headache... failed in changing the material of a materialbillboard in every way possible, and I can't use c++ :/

avatar image rajkosto Dec 20 '14 at 11:55 PM

If you make that change in C++, SetMaterial node in Blueprint works.

avatar image n4rc0 Dec 21 '14 at 12:01 AM

yep I would really like to do it in c++, but changing my whole setup only for this bug. If I don't find a workaround I will consider, thanks :)

avatar image rajkosto Dec 21 '14 at 12:02 AM

How is it changing anything about your setup ? It's an engine source code change, nothing to do with game code.

avatar image n4rc0 Dec 21 '14 at 12:11 AM

I use the blueprint only version, no visual studio, null experience... but seems like the last post of this thread have found a workaround: https://forums.unrealengine.com/showthread.php?1464-I-can-t-get-Dynamic-Material-Color-changes-to-work

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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