简体   繁体   中英

Add a component script through script(C#) Unity5

Good day everyone . I just need a little help from you fellow programmers. Can you help me with my problem. I want to add the script automatically from my On Activate() and On Deactivate() . How can i obtain this. Please help me.

看到这张照片

detector.OnActivate.AddListener(); detector.OnDeactivate.AddListener();

By just doing this i already answered my own questions . Thanks anyway guys :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM