Hi @rehman97,
So to do that you will need to implement a number of things:
-
Keep your model geometry as separate modular pieces. This way you can easily select/update part of your model (e.g. a wall or floor).
-
Implement an entity picking system, there are several examples here: Tutorials | Learn PlayCanvas
-
As soon as you have your picked entity available in code, you can get access to the render component material and update or replace it. This examples demonstrates that:
https://developer.playcanvas.com/en/tutorials/switching-materials-at-runtime/