Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Need help with abandoned Asset. No support. Need help Building DLL from Source.

Discussion in 'Scripting' started by EdKirby, Oct 14, 2021.

  1. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    43
    Hi Folks,

    Firstly, if this isn't the correct place to post this I apologize in advance.

    The tldr; this asset is dll based and I need some guidance rebuilding the assemblies from source.

    I have an asset, Word Game Builder, that I'm using in my game that is no longer being supported, still being sold the last time I checked, but the creator is MIA. When I tried to build for iOS there were some build errors related to the package. I have the pro version so I have access to the source code and I believe that I've corrected the issues. I had upgraded the project and obsolete references were in the original WGB code. It's last version is from 2017.

    The problem I'm having now is that the API is dll based and even though I have knowledge of how to create a basic .dll file, I don't know how to create the dll they way the creator intends.

    See doc at link, at the bottom of the documentation it mentions compilation defines, where do I enter those?:

    https://assets-support.thinksquirrel.com/article/155-word-game-builder-pro-source-code-guide

    Some screenshots of what I'm working with, the dll is what I need to replicate, on left and source code and how it's laid out on right:

    TheDLL.png TheSource.png



    My knowledge of working with external projects is limited. I'm using Rider and with it I created a Unity Class Library, I've been testing various permutations and trying to get a feel for the whole process of creating the assemblies but I've also run into build issues such as:

    LetterTileColorControl.cs(6, 19): [CS0234] The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    OR

    LetterTileUIInput.cs(20, 94): [CS0246] The type or namespace name 'IPointerEnterHandler' could not be found (are you missing a using directive or an assembly reference?)

    Even though, I believe, all the references are set correctly and no compile errors.

    So, I've got a few issues that I'm trying to work through and it's due to my lack of knowledge. Let me know what else I may need to post to help you help me. ;-)

    Any help would be most appreciated. I was almost done and getting ready to ship when this popped up.

    Thanks much!
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,748
    The asset isn't broken (probably) - You just need to install the Unity UI package in the Package Manager window, as this gorgeous and professional infographic will guide you towards:
    upload_2021-10-14_12-41-27.png
     
    Joe-Censored and EdKirby like this.
  3. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    43
    LOL, I can see you are a professional. Very pretty!

    However, I did do all this last night and it appears it was installed and the dlls were all in the expected places. I will go back over this and make sure I did it correctly though. Thanks!!
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    Also, if you have the source, don't bother making a DLL unless you really need to for some reason.

    Making a DLL makes the entire Unity3D development process far more brittle and adds zero value, setting internal breakpoints, instrumenting code, etc.

    Also, always use proper industrial-grade source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    Here's how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally setting Unity up (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
     
    Joe-Censored and EdKirby like this.
  5. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,386
    I agree with Kurt-Dekker to not compile your code in to a dll if you don't need to, but if you really need that code to be in a separate DLL for some reason then another option is to create an assembly definition in Unity. So Instead of creating a dll in your IDE and then trying to integrate that into your project, Unity will just do all that for you.

    https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html

    My experience with this is very limited, unfortunately, so I couldn't really help with this. Just pointing out that there's another option to explore.
     
    Joe-Censored and EdKirby like this.
  6. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    43
    Thanks Kurt, I do use source control, SourceTree and Git so I'm good there. Thanks for the references! I use it in my day job too but with ADO. Love it. Git that is. ;-)

    If I didn't need to rebuild the assemblies I sure as heck wouldn't. I'd rather just reference the source code directly but the API was designed in a way that requires the WGB.Runtime.dll file. If I fail here, my next direction might be to try to decouple the API parts.

    But of course the DLL has to be tightly coupled to the other functionality that the API affords you.<sarcasm> :D And since I don't know how to uncouple it (yet?) I'm kind of stuck with rebuilding the DLL with my fixes and like I said in my original post, I'm sure that this is due to my ignorance. ;)
     
  7. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    43
    To add to my reply. Unfortunately, it's broken. The code is from 2017 and had obsolete references in it and it broke when updating to the latest Unity. I updated the code and all is good but I don't know how to rebuild the assemblies. Unfortunately, again, the API requires that the code be built into a DLL. Unless I can figure out how to make work otherwise.

    If someone could just show me how to build the DLL the way the developer and API expects, I'd be golden.

    Anyway, thanks much for the suggestion!