Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build with Steamworks SDK #122

Closed
zh99998 opened this issue Jul 26, 2021 · 3 comments
Closed

Can't build with Steamworks SDK #122

zh99998 opened this issue Jul 26, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@zh99998
Copy link

zh99998 commented Jul 26, 2021

My project is using Facepunch.Steamworks, which includes a native steam sdk. https://wiki.facepunch.com/steamworks/Installing_For_Unity
It build in my windows server successfully, but script compile phase failed in gameci/editor container.

then Steamworks seems could't be loaded.

what I do is:

docker run --rm -it unityci/editor:2020.3.8f1-linux-il2cpp-0.14 bash

// clone my project
export BUILD_NAME=ExampleProjectName BUILD_TARGET=StandaloneLinux64 UNITY_LICENSE="$(cat ./ci/Unity_lic.ulf)"
chmod +x ./ci/before_script.sh && ./ci/before_script.sh
chmod +x ./ci/build.sh && ./ci/build.sh

I also tried unityci/editor:2020.3.8f1-windows-mono-0.14 and BUILD_TARGET=StandaloneWindows64, same error.

part of builg log:

-----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll
Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
Copyright (C) Microsoft Corporation. All rights reserved.

Assets/Scripts/PlayerData.cs(6,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)
Assets/Scripts/SteamManager.cs(1,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)
Assets/Scripts/UI/Lobby/UI_Lobby.cs(3,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)
Assets/Scripts/GameSystem/PickSystem/IPickable.cs(8,17): warning CS0108: 'IPickable.SystemInit()' hides inherited member 'ISelectable.SystemInit()'. Use the new keyword if hiding was intended.
-----EndCompilerOutput---------------
- Finished compile Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll in 1.919343 seconds
- Finished script compilation in 46.285779 seconds
Assets/Scripts/PlayerData.cs(6,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/SteamManager.cs(1,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/UI/Lobby/UI_Lobby.cs(3,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/GameSystem/PickSystem/IPickable.cs(8,17): warning CS0108: 'IPickable.SystemInit()' hides inherited member 'ISelectable.SystemInit()'. Use the new keyword if hiding was intended.

Assets/Plugins/iS.RTS Camera/Editor/ISRTSCamera2DEditor.cs(181,9): warning CS0618: 'PrefabUtility.GetPrefabType(Object)' is obsolete: 'Use GetPrefabAssetType and GetPrefabInstanceStatus to get the full picture
about Prefab types.'

Assets/Plugins/iS.RTS Camera/Editor/ISRTSCamera2DEditor.cs(181,57): warning CS0618: 'PrefabType' is obsolete: 'PrefabType no longer tells everything about Prefab instance.'

Assets/Plugins/iS.RTS Camera/Editor/ISRTSCamera2DEditor.cs(206,4): warning CS0618: 'PrefabUtility.CreatePrefab(string, GameObject)' is obsolete: 'Use SaveAsPrefabAsset instead.'

Assets/Plugins/iS.RTS Camera/Editor/ISRTSCameraEditor.cs(244,9): warning CS0618: 'PrefabUtility.GetPrefabType(Object)' is obsolete: 'Use GetPrefabAssetType and GetPrefabInstanceStatus to get the full picture about Prefab types.'

Assets/Plugins/iS.RTS Camera/Editor/ISRTSCameraEditor.cs(244,57): warning CS0618: 'PrefabType' is obsolete: 'PrefabType no longer tells everything about Prefab instance.'

Assets/Plugins/iS.RTS Camera/Editor/ISRTSCameraEditor.cs(270,4): warning CS0618: 'PrefabUtility.CreatePrefab(string, GameObject)' is obsolete: 'Use SaveAsPrefabAsset instead.'

AssetDatabase: script compilation time: 49.725630s
Scripts have compiler errors.


Aborting batchmode due to failure:
Scripts have compiler errors.
@zh99998 zh99998 added the bug Something isn't working label Jul 26, 2021
@zh99998
Copy link
Author

zh99998 commented Jul 26, 2021

seems it using unity PluginImporter in .meta file to deal with platform-specific things.
in the document:

Unity Config
We have included the Unity .meta files in the zip file, so everything should be set up. The dlls should be assigned to the right platforms and should copy the dlls to the right locations on build.

I wonder the build environment breaks this.

Facepunch.Steamworks.Win64.dll.meta

fileFormatVersion: 2
guid: b3ad7ccc15f481747842885a21b7b4ab
PluginImporter:
  externalObjects: {}
  serializedVersion: 2
  iconMap: {}
  executionOrder: {}
  defineConstraints: []
  isPreloaded: 0
  isOverridable: 0
  isExplicitlyReferenced: 0
  validateReferences: 1
  platformData:
  - first:
      '': Any
    second:
      enabled: 0
      settings:
        Exclude Editor: 0
        Exclude Linux: 1
        Exclude Linux64: 1
        Exclude LinuxUniversal: 1
        Exclude OSXUniversal: 1
        Exclude Win: 1
        Exclude Win64: 0
  - first:
      Any: 
    second:
      enabled: 1
      settings: {}
  - first:
      Editor: Editor
    second:
      enabled: 1
      settings:
        CPU: x86_64
        DefaultValueInitialized: true
        OS: Windows
  - first:
      Facebook: Win
    second:
      enabled: 0
      settings:
        CPU: None
  - first:
      Facebook: Win64
    second:
      enabled: 0
      settings:
        CPU: AnyCPU
  - first:
      Standalone: Linux
    second:
      enabled: 0
      settings:
        CPU: None
  - first:
      Standalone: Linux64
    second:
      enabled: 0
      settings:
        CPU: None
  - first:
      Standalone: LinuxUniversal
    second:
      enabled: 0
      settings:
        CPU: None
  - first:
      Standalone: OSXUniversal
    second:
      enabled: 0
      settings:
        CPU: None
  - first:
      Standalone: Win
    second:
      enabled: 0
      settings:
        CPU: None
  - first:
      Standalone: Win64
    second:
      enabled: 1
      settings:
        CPU: AnyCPU
  - first:
      Windows Store Apps: WindowsStoreApps
    second:
      enabled: 0
      settings:
        CPU: AnyCPU
  userData: 
  assetBundleName: 
  assetBundleVariant: 

@zh99998 zh99998 closed this as completed Jul 31, 2021
@bryding
Copy link

bryding commented Apr 5, 2023

@zh99998 I'm having the same problem. Did you ever solve this?

@bryding
Copy link

bryding commented Apr 5, 2023

I solved it. The docker container is running in linux. The Facepunch.Steamworks.Posix dll is pointed at macos instead of linux in the Editor settings. Select this dll in the Unity editor, click the icon corresponding to Editor settings, and switch it from Macos to linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants