1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Creating Material Instances in an actor class

Discussion in 'Programming' started by envenger, Jan 16, 2014.

  1. envenger

    envenger New Member

    Joined:
    Jan 16, 2014
    Messages:
    2
    Likes Received:
    0
    Hi guys... How do I create a MaterialInstanceConstant in an actor class.

    I tried reading some guides on net about it, most of them give an error.

    Code:
    class Testactor extends Actor
    ClassGroup(Test)
    placeable;
    
    
    var MaterialInstanceConstant conc;
    
    function PostBeginPlay()
    {
    conc = Mesh.CreateAndSetMaterialInstanceConstant(0);
    super.PostBeginPlay();
    }
    
    defaultproperties
    {
      Begin Object Class=StaticMeshComponent Name=MyStaticMeshComponent
        StaticMesh=StaticMesh'PhysTest_Resources.RemadePhysBarrel'
      End Object
      Components.Add(MyStaticMeshComponent)
    }
    
    Also gives and error.
     
  2. ambershee

    ambershee Nimbusfish Rawks

    Joined:
    Apr 18, 2006
    Messages:
    4,519
    Likes Received:
    7
    This forum is for the Unreal Engine 2 Runtime, it doesn't have material instances.

    There are UDK development forums over at forums.epicgames.com
     

Share This Page