Third Person Item's materials not changing to invisible

maherar

Member
I created a list on runtime pickup, on this list I am printing some information using UI Test objects.
When I am in 1st person mode, the third-person's item objects are not changing material to invisible and still visible to me.

1666347610161.png
 
Any object that has the ThirdPersonObject component will change when the perspective switches.
 
If you are using an item then you don't need to add the Third Person Objects component. Make sure the visible item on the item perspective component points to the correct reference.
 
If you are using an item then you don't need to add the Third Person Objects component. Make sure the visible item on the item perspective component points to the correct reference.
I am using a mesh with the following properties and components, but I cannot hide the texts of the third person when playing in 1st person mode. I asked you earlier and struggled but couldn't find the solution. Please help me to find a solution. Or is there any way to deactivate objects in 1st person's mood and reactivate them when moving to 3rd person mode?
I am looking forward to hearing from you.
Thanks
 

Attachments

  • item.jpg
    item.jpg
    91.6 KB · Views: 2
C#:
void Awake(){
                EventHandler.RegisterEvent<bool>(m_GameObject, "OnCameraChangePerspectives", OnChangedPerspective);
}
void OnDestroy(){
                EventHandler.UnRegisterEvent<bool>(m_GameObject, "OnCameraChangePerspectives", OnChangedPerspective);
}
private void OnChangedPerspective(bool isFirstPerson){
                   //Do Stuff.
}
 
C#:
void Awake(){
                EventHandler.RegisterEvent<bool>(m_GameObject, "OnCameraChangePerspectives", OnChangedPerspective);
}
void OnDestroy(){
                EventHandler.UnRegisterEvent<bool>(m_GameObject, "OnCameraChangePerspectives", OnChangedPerspective);
}
private void OnChangedPerspective(bool isFirstPerson){
                   //Do Stuff.
}
I am not facing the problem of perspective change. If I am in 1st person's mood, the third person's equip item's objects will be visible. even if I change the perspective or not.
 
Top