vrchat-community / ClientSim

Client Simulator for World Building
https://clientsim.docs.vrchat.com
Other
237 stars 24 forks source link

v1.1.0 CS0246 'ONSPAudioSource' could not be found missing a using directive or an assembly reference error #6

Closed junebug12851 closed 1 year ago

junebug12851 commented 2 years ago

I imported this url into package manager which imports version 1.1.0 specifically. https://github.com/vrchat-community/ClientSim.git#1.1.0

and I get 2 issues as soon as I import it

Library\PackageCache\com.vrchat.clientsim@7b3a59c809\Runtime\Helpers\ClientSimSpatialAudioHelper.cs(8,48): error CS0246: The type or namespace name 'ONSPAudioSource' could not be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.vrchat.clientsim@7b3a59c809\Runtime\Helpers\ClientSimSpatialAudioHelper.cs(15,17): error CS0246: The type or namespace name 'ONSPAudioSource' could not be found (are you missing a using directive or an assembly reference?)
NarryG commented 2 years ago

You'll need to import the updated package-manager based SDK and not the old UnityPackage SDK due to how Unity handles dependencies with packages, or else certain imports won't work as expected.

junebug12851 commented 2 years ago

What's the updated package-manager based SDK. Also tysm for a very quick response.

zhdlxh48 commented 2 years ago

I have also same problem... what is

updated package-manager based SDK

Please help this problem... @NarryG

I imported this package using Unity built-in Package Manager

CyanLaser commented 2 years ago

@junebug12851 @zhdlxh48 The package-manager based SDK is the sdk uploaded to github at vrchat/packages. ClientSim also lists its dependencies in the package.json. Just as you used the git link to install ClientSim in unity, use these two links to import the package version of the sdk: https://github.com/vrchat-community/ClientSim/blob/7b3a59c809730f8d47da31f3aeaa93e42e88786f/package.json#L12-L13

oivio commented 2 years ago

@junebug12851 @zhdlxh48 The package-manager based SDK is the sdk uploaded to github at vrchat/packages. ClientSim also lists its dependencies in the package.json. Just as you used the git link to install ClientSim in unity, use these two links to import the package version of the sdk:

https://github.com/vrchat-community/ClientSim/blob/7b3a59c809730f8d47da31f3aeaa93e42e88786f/package.json#L12-L13

Are there more clear steps for installation since adding both links results in much more errors? I mean step by step clean project.

( new to Unity )

momo-the-monster commented 2 years ago

@oivio:

  1. Open the Unity Package Manager, click the + button and choose 'Add package from git URL...'
  2. Enter this url: https://github.com/vrchat/packages.git?path=/packages/com.vrchat.base#3.0.1. Wait until the package finishes importing (you may need to press CTRL+R to jumpstart the process if you have Auto-Refresh turned off in the Unity Editor)
  3. Once complete, choose 'Add package from git URL...' again and enter: https://github.com/vrchat/packages.git?path=/packages/com.vrchat.worlds#3.0.1
  4. If you haven't already done so, add the ClientSim package: https://github.com/vrchat-community/ClientSim.git#1.1.0

Wait for everything to complete. You may need to select VRChat SDK > Reload Plugins from the top menu to finalize the plugin loading, then you should be ready to use everything together. Note that this approach is meant for experienced Unity users, the upcoming VRChat Creator Companion will handle most of this for you.

@junebug12851 - are you still having an issue with ONSPAudioSource?

Adam-Kay commented 2 years ago

@momo-the-monster Does the ordinary SDK have to be completely removed before attempting to install this package version?

pavlov3-progress commented 2 years ago

I have the same problem. Your opinion will be helpful. Thank you very much. ( I use the Google translation app for help )

@Adam-Kay The screen display of this screenshot is displayed. Let me show you how. image

  1. Make Project

  2. Open the Unity Package Manager, click the + button and choose 'Add package from git URL...' Enter url : https://github.com/vrchat/packages.git?path=/packages/com.vrchat.base#3.0.1 done. Enter next url : https://github.com/vrchat/packages.git?path=/packages/com.vrchat.worlds#3.0.1 done. Enter next url : https://github.com/vrchat-community/ClientSim.git#1.1.0

  3. Assets -> Import Package -> Custom Package import VRCSDK3-WORLD unitypackage

  4. Press Yes ( editer will be rebooted ) import_CSim_Warning

  5. Press the play button

Adam-Kay commented 2 years ago

Unfortunately, this process didn't work for me, I am not able to access the VRCSDK control panel after following your steps, the option isn't available in Unity: image

I have tried every way I can think of to install this into my existing project: Following @pavlov3-progress's instructions, removing the original SDK3 first, trying to install it after the 3 packages, trying without, deleting the Library folder and letting Unity rebuild it etc. Usually I either can't access the VRCSDK panel, I get 999+ errors, or pressing Play doesn't do anything different than it did before.

I'm not sure if I'm doing it wrong, but I may leave it for now until the VRChat Creator Companion eventually releases to help with this

abcaad commented 2 years ago
  1. Remove old sdk and udonsharp
  2. Package Manager > Add package from git URL... https://github.com/vrchat/packages.git?path=/packages/com.vrchat.base#3.0.1 https://github.com/vrchat/packages.git?path=/packages/com.vrchat.worlds#3.0.1 https://github.com/vrchat-community/ClientSim.git#1.1.0 VRChat SDK - Worlds > samples > import into Project
  3. Assets -> Import Package -> Custom Package import UdonSharp.unitypackage
  4. Close Project
    Delete projectfolder/*.csproj projectfolder/*.sln
  5. Open Project Assets > Reimport All

I don't know which operations are redundant.

Conmiro commented 2 years ago
  1. Remove old sdk and udonsharp
  2. Package Manager > Add package from git URL... https://github.com/vrchat/packages.git?path=/packages/com.vrchat.base#3.0.1 https://github.com/vrchat/packages.git?path=/packages/com.vrchat.worlds#3.0.1 https://github.com/vrchat-community/ClientSim.git#1.1.0 VRChat SDK - Worlds > samples > import into Project
  3. Assets -> Import Package -> Custom Package import UdonSharp.unitypackage
  4. Close Project Delete projectfolder/*.csproj projectfolder/*.sln
  5. Open Project Assets > Reimport All

I don't know which operations are redundant.

Followed these steps on a fresh Unity 2019.4.31f1 3D project, and did not work. After adding UdonSharp (even with steps 4 and 5), the editor shows three instances of the below message with different dll files called out:

Assembly 'Assets/VRCSDK/Dependencies/Managed/Microsoft.CodeAnalysis.CSharp.dll' will not be loaded due to errors: Microsoft.CodeAnalysis.CSharp references strong named System.Collections.Immutable Assembly references: 1.2.1.0 Found in project: 5.0.0.0. Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation" This error is thrown for the 3 dll's that UdonSharp brought into Assets/VRCSDK/Dependencies/Managed. I'm not sure why UdonSharp is bringing in items under a folder for VRCSDK assets, but that seems to be the cause of the error.

These errors are not there when you bring in the VRChat SDK via Assets -> Import Package -> Custom Package, but then there are the errors that OP mentioned.

image

momo-the-monster commented 1 year ago

@Conmiro @junebug12851 - are these issues still present for you when using ClientSim 1.2.2 via the Creator Companion?

cubedparadox commented 1 year ago

I'm going to close this issue out due to inactivity + out of date packages. If you encounter similar issues using the latest version of ClientSim via the Creator Companion, feel free to open a new issue!