Hi!
Recently I switched from UT2004 to UDK. Currently, I am struggling with static meshes. In UT2004 it was no problem to change the texture of StaticMesh. In UDK there is this new material system and I am a little bit confused. I have this code (that works):
Now I would like to change the Texture of StaticMesh'UN_SimpleMeshes.TexPropCube_Dup' to something else (and I would like to leave the original mesh file intact). Either in DefaultProperties or dynamically in the code. Is there somewhere a tutorial or an example how to do it? So far I've found nothing.
Thanks,
sk
Recently I switched from UT2004 to UDK. Currently, I am struggling with static meshes. In UT2004 it was no problem to change the texture of StaticMesh. In UDK there is this new material system and I am a little bit confused. I have this code (that works):
Code:
class PathMarker extends StaticMeshActor
placeable;
var MaterialExpressionTextureSample myMaterial;
DefaultProperties
{
//Good old UT2004 way: :/
//DrawType=DT_StaticMesh
//StaticMesh=StaticMesh'UN_SimpleMeshes.TexPropCube_Dup'
//Skins(0)=Texture'EngineResources.WhiteSquareTexture'
Begin Object Class=StaticMeshComponent Name=PathMarkerComponent
bUsePrecomputedShadows=true
bAcceptsStaticDecals=false
bAcceptsDynamicDecals=false
StaticMesh=StaticMesh'UN_SimpleMeshes.TexPropCube_Dup'
WireframeColor=(R=255,G=0,B=0,A=255)
bDisableAllRigidBody=true
CastShadow=false
RBChannel=RBCC_Nothing
bCastDynamicShadow=false
bSelfShadowOnly=true
bAcceptsLights=true
bAcceptsDynamicLights=false
bAcceptsDynamicDominantLightShadows=true
End Object
StaticMeshComponent=PathMarkerComponent
Components.Remove(StaticMeshComponent0)
Components.Add(PathMarkerComponent)
CollisionComponent=None
bCollideActors=false
bCollideWorld=false
DrawScale=0.03
bStatic=false
}
Now I would like to change the Texture of StaticMesh'UN_SimpleMeshes.TexPropCube_Dup' to something else (and I would like to leave the original mesh file intact). Either in DefaultProperties or dynamically in the code. Is there somewhere a tutorial or an example how to do it? So far I've found nothing.
Thanks,
sk