Get Component From Demo Menu

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Kerple
Posts: 9
Joined: Sat Aug 05, 2023 1:14 pm

Get Component From Demo Menu

Post by Kerple »

I'm currently working on adjusting the Demo Menu for my game. I am trying to kill my player from the menu. I need my menu to access another script I wrote called PlayerHealthSystem.cs, However because of my file system I can't use a get component. Should I use a wrapper class or something else I am looking for suggestions. I attached two screenshots to show off the line and the error I am getting.
Attachments
The Line with the error code I am getting
The Line with the error code I am getting
image_2024-01-26_181626691.png (21.14 KiB) Viewed 648 times
A better image of the full line
A better image of the full line
image_2024-01-26_181607688.png (96.88 KiB) Viewed 648 times
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get Component From Demo Menu

Post by Tony Li »

Hi,

Scripts in the Plugins folder can't see scripts that are outside of Plugins.

Duplicate DemoMenu.cs. Then rename the duplicate and move it into your own scripts folder. Then you can customize it to reference your scripts.
Kerple
Posts: 9
Joined: Sat Aug 05, 2023 1:14 pm

Re: Get Component From Demo Menu

Post by Kerple »

Your suggestion worked thank you very much for you help!
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get Component From Demo Menu

Post by Tony Li »

Glad to help!
Post Reply