[DisallowMultipleComponent] Don't function for me

Hello everyone!

I have been having problem with
[DisallowMultipleComponent], I made all the script shown in class but it doesn’t work.
Could someone tell me what was the cause of the problem?

Thanks!

Hi Marcos,

What do you mean by “it doesn’t work” ? What exactly did you do? What did you expect to happen? What happened instead?

Hi Nina,

Well I figured out what the problem was, the “static” in my code was turned on. But I have another problem in the game step “Argon_Assult”, I have a problem in class “86 - Using Cross Platform Input” - my Player script works but there is no message on the console, as in the example in the lesson. I am using Unity 2020.3.22f. And I imported the Assets pack too.

I’m glad you solved the first problem. :slight_smile:

Regarding the missing messages, are the messages enabled in your console?

console (2)

Also make sure the method names are spelt correctly. And the methods must not be declared within the code blocks of other methods. Remember you can also look at the lecture code changes via the link in the Resources of each lecture.

Hi Nina,

Thanks for your help. :slightly_smiling_face:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms