Answer the question
In order to leave comments, you need to log in
Do SkinnedMesh and MeshFilter have some common descendant?
Hello! I am making a building system and the player can put houses or fighters on the map. When a player places an object, the cursor point shows how the placed object will look like. To show the delivered object I change the mesh.
To show the house I do it like this:
MeshFilter.mesh = BuildingPrefab.Value.MeshFilter.sharedMesh;
MeshFilter.mesh = BuildingPrefab.Value.SkinnedMeshRenderer.sharedMesh;
MeshFilter.mesh = BuildingPrefab.Value.MeshFilter != null ?
BuildingPrefab.Value.MeshFilter.sharedMesh :
MeshFilter.mesh = BuildingPrefab.Value.SkinnedMeshRenderer.sharedMesh;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question