question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactor to a more encapsulated package

See original GitHub issue

Hey Riley,

I’m currently looking more seriously into adding SteamInput support to InControl. To do that I would need to add a dependency on Steamworks.NET but that is currently problematic.

I’d like to suggest that Steamworks.NET be restructured to be more neatly and easily dropped into a project, or pulled in through the Package Manager.

I’d be happy to help with this process, and even do most of it if you don’t have time!

Here’s what I recommend:

  1. Move files around into the file structure that Unity packages have standardized on:
Steamworks (root folder)
- Editor (current Editor/Steamworks.NET contents goes here)
- Runtime (current Plugins/Steamworks.NET contents goes here)
- Plugins (rest of plugins goes in here)
  1. Add assembly definitions in Runtime (Steamworks) and Editor (Steamworks.Editor) above. Plugins does not get an assembly definition. This allows setting a reference in InControl’s assembly definition along with a preprocessor that gets defined when the package is present.

  2. Add a package definition which would allow Steamworks.NET to be more easily installed via tarball or git.

  3. Fix the native plugins metadata. Currently they have a few errors and have to be manually fixed, sometimes with a bunch of Unity restarts involved. For InControl, I have a development editor script that sets up the plugins properly. I run this in each version of Unity before I package and submit for that Unity version to the Asset Store. Older versions of Unity have slightly different import configurations (and even bugs!) that aren’t compatible with later versions. But it would be good to focus on setting it correctly for 2019 LTS onwards (and going forward, set for maybe the last LTS or if there’s a serious conflict, for latest release Unity).

The Standalone folder throws a bit of a wrench in the works—I’m not actually sure if it’s safe to just have that hanging out in the package folder, but I can test that. Worst case, that folder could just be a ZIP archive since its contents isn’t really super important to version control in the sense of line by line code, but only as a whole.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
rlabrecquecommented, May 3, 2021

Steamworks.NET can now be installed as a Unity package 🎉

Unity Package path: https://github.com/rlabrecque/Steamworks.NET.git?path=/com.rlabrecque.steamworks.net

image

Validation remains.

2reactions
wagenheimercommented, May 7, 2021

Please update the documentation to indicate the availability from the Package Manager.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Encapsulate Field
What's more, the program involves a great many different objects in which these fields are present. So accessing the coordinate fields directly saves ......
Read more >
Encapsulate Fields | IntelliJ IDEA Documentation
The Encapsulate Fields refactoring lets you hide your data and create the necessary accessors. Hiding your data and accessing it through an ...
Read more >
Encapsulate Classes with Factory | Refactoring to Patterns
Encapsulate Classes with Factory. Clients directly instantiate classes that reside in one package and implement a common interface.
Read more >
Domain-Driven Refactoring: Encapsulating Collections
Expose a more usable, read-only version of our collection. The latter option is usually more desirable. We also have the issue where client...
Read more >
What's the best way to refactor a method that has too many ...
The classic answer to this is to use a class to encapsulate some, or all, of the parameters. In theory that sounds great,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found