Access objects enum type

Is there a way to detect enum type of object which my player collide with. I done lot of research, but I didnt find anything usefull.

From your collision you’ll get the cube/gameObject you collided with. From that you can do something like

ScriptWithEnum scriptWithEnum = collision.gameObject.GetComponent<ScriptWithEnum>();

then you can do

if(scriptWithEnum.variableOfTypeEnum.Enum.Value == "....") 
// do stuff

Obviously change those values to ones that fit your code.