How can I embed photo or audio files in DLL or some closed source and access it in c#?

Viewed 48

I am building a plugin for Unity that forms a set of functional components. Since the components are large and numerous, I prefer to leave the plugin in dll format and I was successful here. But the component icons built in Unity disappear and I want the icons to be attached as a file depending on the plugin.

Inside Main and non-Build project. (original) The component is seen correctly.

Before DLL building inside main project

How to change the icons is only inside the Unity engine and also the images inside the engine are saved and called and not inside the dll

I Could define scripts icon here

After building the dll and importing it to the project, other components have the same situation.

enter image description here

Top information section and how to display the icon in the code.

    GUILayout.BeginHorizontal(BoxStyle());
    
    // This part calls the icon from inside the project
    GUILayout.Box(EditorGUIUtility.ObjectContent(target, target.GetType()).image, clean);
    
    var labelStyle = new GUIStyle(GUI.skin.label)
    {
        alignment = TextAnchor.MiddleLeft
    };
    
    GUILayout.Label(pro.Info, labelStyle);

    GUILayout.EndHorizontal();

Please help me how to execute a way to close the icons and call them from dll.

0 Answers
Related