cvayer / Belote-Unity

Small belote game to test card game IA
1 stars 0 forks source link

'MenuCreateBase' is inaccessible due to its protection level" #2

Open TurkiSohimi opened 4 years ago

TurkiSohimi commented 4 years ago

when I open the project I get this error: "Assets\Scripts\GameScreen\Definition\MenuCreateGameScreenDefinition.cs(5,47): error CS0122: 'MenuCreateBase' is inaccessible due to its protection level"

I checked on the code but I didn't picked up what's actually wrong.

"class MenuCreateGameScreenDefinition : MenuCreateBase { [MenuItem("Assets/Create/Belote/Definition/GameScreen")] public static void Create() { Create("GameScreenDefinition"); } }"

tried to change the class to public but nothing changed.

your project seems very educational, I want to build a card game my self. I am in my learning curve though :) ... seeing other people approach and learning by observation. it seems like you put quite a work in building the game by going through the cods and files, good job sir.

cvayer commented 4 years ago

Hello !

Thanks for your kind words ! I wanted to create this project to see how to make a card Game AI initially. I now have a working game with the AI playing valid random cards but I have yet to find the time to implement the real AI X)

For your issue, it's mayme because you are missing this project : https://github.com/cvayer/Pebble-Unity

You can add it as a dependency repo or belote and have the files in Asset/Scripts/

Pebble is just a small cross project framework that I reuse between prototypes.

Have a good day !

TurkiSohimi commented 4 years ago

Thanks for the reply.. I have added the "https://github.com/cvayer/Pebble-Unity" to the plugins folder.. but I'll try adding it to the script folder.

cheers.

balsulami commented 3 years ago

I have the same issue. I tried to download "https://github.com/cvayer/Pebble-Unity" and add it to the assets but it didn't work. This is the error message I get:

"Assets\Scripts\GameScreen\Definition\MenuCreateGameScreenDefinition.cs(7,6): error CS0246: The type or namespace name 'MenuItem' could not be found (are you missing a using directive or an assembly reference?)"

cvayer commented 3 years ago

Hello, have you tried putting the Pebble folder into your scripts folder ? it should work then.

To handle both this project and Pebbel with github you need to add Pebble as a dependency of Belote-Unity.

Tell me if it worked !

balsulami commented 3 years ago

I managed to make it work after a few hours of searching. It turns out I have to put anything related to UnityEditor in a folder named Editor. I'm new to Unity so this is new. I appreciate your help