Skip to content
This repository was archived by the owner on Oct 28, 2020. It is now read-only.
This repository was archived by the owner on Oct 28, 2020. It is now read-only.

Failed to inject assembly when there is a reference to another assembly #9

@StandoffVenus

Description

@StandoffVenus

My current project always returns NULL from mono_class_from_name().

The project is built with .NET Framework v4.6.1 and for Any CPU (like the example assembly), and I've used the GUI app to test injecting it into a 32-bit Unity game. I've got the namespace (WhiteNoise.Cheat.Loader.Models), class name (Loader), and method (Load) correct, but the injection is never successful.

This is what my loading class looks like:

namespace WhiteNoise.Cheat.Loader.Models
{
    using UnityEngine;
    using WhiteNoise.Cheat.Common.Components;

    public class Loader
    {
        private static GameObject Object { get; set; }

        public static void Load()
        {
            Loader.Object = new GameObject();
            Loader.Object.AddComponent<CheatComponent>();
            UnityEngine.Object.DontDestroyOnLoad(Loader.Object);
        }

        public static void Unload()
        {
            UnityEngine.Object.Destroy(Loader.Object);
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions