scenario-labs / Scenario-Unity

The Scenario Unity Plugin allows you to live the Scenario experience directly into Unity
https://www.scenario.com
66 stars 4 forks source link

Code error when opening Scenario on Unity2022.3.4 #71

Closed XHflame closed 12 months ago

XHflame commented 1 year ago

Describe the bug When I leave https://github.com/scenario-labs/Scenario-Unity/releases/download/v0.1.1/Scenario3D.zip

After downloading the file, I encountered a code error in the Assets section where I placed Scenario in Unity. The specific code error is as follows: Assets Scenario Plugins ApiClient. cs (1,7): error CS0246: The type or namespace name 'Cytoharp' could not be found (are you missing a using directive or an assembly reference?)

Assets Scenario Plugins ApiClient.cs (13,25): error CS0246: The type or namespace name 'UniTask<>' could not be found (are you missing a using directive or an assembly reference?)

Assets Scenario Plugins ApiClient.cs (37,25): error CS0246: The type or namespace name 'UniTask<>' could not be found (are you missing a using directive or an assembly reference?)

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Unity can operate normally If someone can help me answer, you can leave a message below or email me 1906875738@qq.com Screenshots c457fbdf132406c99bbfd648515c37d

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

mrbusysky commented 1 year ago

Have you followed all the steps? Delete the JSON files and reinstall unitask in first install file.

XHflame commented 1 year ago

After I imported the files from Scenario into Unity, there were no other operations and a bug appeared. Can you share the Unity project you used? thanks

mrbusysky commented 1 year ago

You imported all the files? You are only supposed to put the install file in one by one as per the install guide. Delete every file other than install file 1 then when done with that add install file 2 once that is done then you can add the other files. You can find the install guide in the readme

https://help.scenario.com/installing-the-unity-plugin

XHflame commented 1 year ago

I will https://github.com/scenario-labs/Scenario-Unity/releases/download/v0.1.1/Scenario3D.zip The above error occurred when importing into the Unity3D project

mrbusysky commented 1 year ago

That error that is occurring is from one of the dependencies not being installed.

Are you on mac or windows?

XHflame commented 1 year ago

windows

mrbusysky commented 1 year ago

Then I would recommend removing all files related to scenario and following the guide step by step.

If this doesn't work you will need to manually add the package. But as a window users it should work just fine following the guide as the steps say. If this does not work I'll send how to manually install the package

XHflame commented 1 year ago

Sorry, I may not have enough abilities to solve this problem, but I really want to experience the power of scenario in Unity. Can you share the project with me? Thank you for helping me solve the problem. Thank you

mrbusysky commented 1 year ago

for unitask: go to window > package manager > hit the + > add package from github url > https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask#2.1.0

XHflame commented 1 year ago

With your help, I followed the method you suggested. My project no longer had the previous bug, and then this error occurred. Assets Scenario Editor Images Images.cs (12,7): error CS0246: The type or namespace name 'RestSharp' could not be found (are you missing a using directive or an assembly reference?). Can I comment out the code related to RestSharp directly? Will this affect the functionality of Scenario?

mrbusysky commented 1 year ago

Did you do the second install file as well?

This is the name of the file: Scenario Package Installer 2.cs

mrbusysky commented 1 year ago

The install files should auto install this stuff for you

mrbusysky commented 1 year ago

You can find it after it is installed in window