Search Unity

how can i use resources.load<>(prefabs) by class type?

Discussion in 'Prefabs' started by pchm20, Dec 28, 2018.

  1. pchm20

    pchm20

    Joined:
    Nov 17, 2018
    Posts:
    1
    I saw some sample code,
    in that code, use load method like this

    agent _agent = resources.load<agent>(“Prefabs”);

    That prefabs had script component monobehavior class agent.cs, and in that script can use that prefabs object like class object

    I try this in my project, but cant load class typed prefabs.

    How can I load prefabs as monobehavior class type object?