How do I export a steam game into a unity package - unity3d

I've been wanting to mod hollow knight for a while now and since I have recently gained experience with the unity game engine I thought I would try it out. The only problem is I can't really find a way to export the files into unity and so far have found no tutorials online maybe exporting it into a package is not the answer so I'm just curious on how to import the files into unity.

That's not really how game modding works. You won't be able to import the compiled game's assets into Unity. If the game uses the Mono runtime (not IL2CPP), you can find the DLL files that contain the game's logic, decompile them (using a decompiler like dotPeek), make modifications to the game's source code (for example, adding your own logic to change behavior and load additional assets), recompile the code, and replace the game's original DLLs with your modified version.

Related

How to include Unity3d libs in a non-Unity3d project?

I'm developing a C# library that will be used either as a plugin in some Unity3d projects and also used in non-Unity3d projects.
I need to use some Unity3d classes (such as UnityEngine.Matrix4x4) and standardize some functions to use valid types agnostically to whether the project is an Unity project or not.
So, as the title says: what is the right way to include Unity3d libraries in a non-Unity3d library project? Should I just include reference to the local Unity3d binaries (like UnityEngine.dll) in my project? If so, which is the right folder to look for these binaries (they appear in some different folders in the unity installation folder)?
If you are not actually running the Unity Engine for rendering or handling input it may be the case of forcing a round peg into a square hole, both technically and legally.
The most elegant solution would likely be to write your library in C# using more agnostic libraries. For example the Matrix4x4 class you mentioned has an equivalent in System.Numerics. Alongside the library all thats needed is a light wrapper converting a System.Numerics.Matrix4x4 to a UnityEngine.Matrix4x4. Sometimes the Unity devs themselves do stuff like this, for example the Unity.Mathematics.float3 struct which works better in ECS land than a standard Vector3.
FYI if you're looking for how some particular system works, check out the C# Reference GitHub Repository, for example the Matrix4x4 struct. Just be aware that 'copying and pasting' Unity source code is not allowed.

How to get a file out of a compiled unity game that I made

I created a mini game using Unity and built it a few months back. It was just a pet project so I deleted the project file but still have the built/compiled game. In the project's ASSETS, I put a text file with some notes that I had created for myself and some scripts.
Is there a way to extract or even just see the text file from my built game? Is there a way to extract all the assets or something?
I'm extremely new at this kind of thing so unfortunately, I don't really know the right way to ask the question or find it on google. Any help would be appreciated.
Thank you.
Probably not
That text file, if it wasn't used as an asset, isn't going to be in your compiled game anyway. But even if it was, finding it and extracting it would be difficult due to the semi-obfuscated nature of dlls and how Unity compresses and builds assets into dlls.
If you want to make the file accessible post-build by design, use StreamingAssets folder.
Otherwise you'll have to rely on 'uglier' methods as mentioned by Draco18s (people steal assets all the time so it's not impossible).
what's your building platform ?
if it's android then you can get a look at the scripts and other text files using ILSpy.
Just change the .apk to .zip
Unzip, and open the compiled files in ILSPY.

TypeLoadException after loading .NET 4.5 C# DLL into Unity 2018.2.5

I want to be able to feed the camera frames from a webcam into Unity. I made a .NET 4.5 C# DLL using MediaFrameReader and event listeners. Here is some other user's implementation for accessing the Hololens camera frames: Hololens - Access Camera Frames.
When I import the DLL into my 2018.2.5 Unity project, it gives me the following error:
Unloading broken assembly "....", this assembly can cause crashes in the runtime
TypeLoadException: Could not find method due to a type load error
The C# plugin built successfully many times on Visual Studio. Also, I have properly set the Api Compatibility Level (in player settings) to .NET 4.x. What could be the fix to this?
All the other SO answers related to this I have already taken a look, but does not seem to help the problem. Thanks for all the help.
EDIT: https://issuetracker.unity3d.com/issues/unity-fails-to-load-net-4-dot-6-assemblies-with-typeloadexception is the most relatable post, but had no solution.
I have few possible solutions for you to explore.
DLLs issues:
Workaround:
Comment your UWP code (the part that uses the DLL), then build it in UNITY without the DLL. In the generated UWP solution, install the package from nuget or manually import the dll, then uncomment your code and finish your development. This is a short-term solution.It is going to be annoying as you re-build your solution many times and have to comment/uncomment then re-add dlls and so on.
Other possible solutions:
Failed to run reference rewriter with command error with unity error when adding a DLL to the assets folder
Your exact need
From your description, you really do not need everything in the link you referenced (Hololens - Access Camera Frames). You need much simpler version. I recently created MediaCapture solution for HoloLens as a workaround because PhotoCapture in Unity is not working in the HoloLens and everything is working without any additional DLLs. I will post for you few links to see if it may help you:
MediaCapture Unity & HoloLens: https://github.com/MSAlshair/HoloLensMediaCapture
This maybe a good start for you. You can combine it with your original reference. Use this project as starting point to make sure your project is building correct, then use the necessary code from the other resource that you posted to accomplish the task that you desire. You may need to download Unity 2018.2.12f1 because I didn't test it in 2018.2.5
MediaCapture & PhotoCapture: Hololens font camera
Good Luck!

How to integrate Unitymol with Unity3D project?

Firstly, thanks for bothering your time reading this problem.
I recently want to develop a Unity3D project which serves for molecular visualization on HTC Vive with the help of SteamVR. I've found that Unitymol is a suitable solution to visualize PDB files, but I have problem import them into Unity3D, because I fail to figure out how can I export models/gameobjects from Unitymol.
What should I do? In fact, what I need is to import PDB files into Unity3D. Blender is not a acceptable solution because it can't load large PDB files and need much work to do after importation.
I am one of the developer of UnityMol.
For now, this project is not fully open sourced and you need the sources to extract generated GameObjects.
You can ask for Marc Baaden to initiate à collaboration.
We have scripts to create Unity assets and use them in other projects.
If you are trying to visualize molecules in VR, we already are doing this in UnityMol VR.

Unity3D gives version error when .blend file is placed in unity's assets folder

When I copy .blend file in Unity's Assets folder it says
Blender could not convert the .blend file to FBX file.
You need to use Blender 2.45-2.49 or 2.58 and later versions for direct Blender import to work.
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEditor.DockArea:OnGUI()
But I am currrently using version 2.7. I am using a .blend file from internet source to use in my game. Does re-saving help in getting rid of errors or is there another possible and efficent way to resolve this issue ?
Although Unity has full function over .Blend files I belive downloading the .Blend file from the internet is the problem
( You may test that theory by exporting a simple model of your own and see if it works with Unity )
If your test model works then it's obviously something wrong downloading it from the internet.
I've had problems with this before and to date have had no solution I suggest trying to copy the model and model it for your self ( perhaps even copy and paste it from one project file to another)
One obvious sign that it will not export correctly is if editing your model in blender sends the model into a orange tint and the object would not be able to be edited....
In conclusion the best thing you can do if it's the internet to blame is attempt to recreat the model and/or animations :) hope it helps and good luck :)