System.Drawing.GDIPlus error
Quote from vdeijk on March 27, 2022, 6:35 pmHi, I just bought TerraWorld, but I'm unable to do anything with it because of an error:
ERROR : The type initializer for 'System.Drawing.GDIPlus' threw an exception.
I get this when loading ANY terrain. How can I fix it?
Hi, I just bought TerraWorld, but I'm unable to do anything with it because of an error:
ERROR : The type initializer for 'System.Drawing.GDIPlus' threw an exception.
I get this when loading ANY terrain. How can I fix it?
Uploaded files:Quote from terraunity on April 3, 2022, 7:18 amHi,
Seems like you missed manual installation steps needed for Mac & Linux systems embedded in TerraWorld package.
So regarding GDIPLus errors, instructions for Mac and Linux is under _INSTALLATION STEPS folder in project. Attached is the instructions again if you need for future reference.
Following is taken from the above Installation Steps ReadMe file for Mac systems:
- STEP 1 : Find the full path of "libgdiplus.dylib" file
.Check your mono.framework versions from here:
/Library/Frameworks/Mono.framework/Versions.Check which version contains "libgdiplus.dylib" file in "lib" folder.
For example if you find the libgdiplus file under version "6.0.12" in "lib" folder, then the full path will be :
/Library/Frameworks/Mono.framework/Versions/6.0.12/lib/libgdiplus.dylib
- STEP 2 : Find Unity Config file
. Find Unity app file from here:
/Applications/Unity/Hub/Editor/"YOUR_UNITY_VERSION"/Unity.app. Right-click on it and select "Show Package Contents"
. Continue to find Unity config file from here:
/Contents/MonoBleedingEdge/etc/mono/config
- STEP 3 : Map gdiplus.dll in confige file
.Open the config file in a text editor and search for the word "gdiplus".
If the word is found, replace the following 2 lines with the existing lines or if not found, add the following 2 lines after others.
And change "target" by yours in STEP 1 :<dllmap dll="gdiplus" target="/Library/Frameworks/Mono.framework/Versions/YOUR_MONO_VERSION/lib/libgdiplus.dylib"/>
<dllmap dll="gdiplus.dll" target="/Library/Frameworks/Mono.framework/Versions/YOUR_MONO_VERSION/lib/libgdiplus.dylib"/>Example
<dllmap dll="gdiplus" target="/Library/Frameworks/Mono.framework/Versions/6.0.12/lib/libgdiplus.dylib" />
<dllmap dll="gdiplus.dll" target="/Library/Frameworks/Mono.framework/Versions/6.0.12/lib/libgdiplus.dylib" />
- STEP 4
.Also add the following line any where in the file and save:
<dllmap dll="Lerc64.dll" target="/Users/TerraWorld/Lerc64.dylib"/>
- STEP 5
.Create a directory at "/Users/TerraWorld/" and copy-paste the provided "Lerc64.dylib" there.
You can find "Lerc64.dylib" in "plugin" folder of your project.
- STEP 6
.Restart Unity.
Hi,
Seems like you missed manual installation steps needed for Mac & Linux systems embedded in TerraWorld package.
So regarding GDIPLus errors, instructions for Mac and Linux is under _INSTALLATION STEPS folder in project. Attached is the instructions again if you need for future reference.
Following is taken from the above Installation Steps ReadMe file for Mac systems:
- STEP 1 : Find the full path of "libgdiplus.dylib" file
.Check your mono.framework versions from here:
/Library/Frameworks/Mono.framework/Versions
.Check which version contains "libgdiplus.dylib" file in "lib" folder.
For example if you find the libgdiplus file under version "6.0.12" in "lib" folder, then the full path will be :
/Library/Frameworks/Mono.framework/Versions/6.0.12/lib/libgdiplus.dylib
- STEP 2 : Find Unity Config file
. Find Unity app file from here:
/Applications/Unity/Hub/Editor/"YOUR_UNITY_VERSION"/Unity.app
. Right-click on it and select "Show Package Contents"
. Continue to find Unity config file from here:
/Contents/MonoBleedingEdge/etc/mono/config
- STEP 3 : Map gdiplus.dll in confige file
.Open the config file in a text editor and search for the word "gdiplus".
If the word is found, replace the following 2 lines with the existing lines or if not found, add the following 2 lines after others.
And change "target" by yours in STEP 1 :
<dllmap dll="gdiplus" target="/Library/Frameworks/Mono.framework/Versions/YOUR_MONO_VERSION/lib/libgdiplus.dylib"/>
<dllmap dll="gdiplus.dll" target="/Library/Frameworks/Mono.framework/Versions/YOUR_MONO_VERSION/lib/libgdiplus.dylib"/>
Example
<dllmap dll="gdiplus" target="/Library/Frameworks/Mono.framework/Versions/6.0.12/lib/libgdiplus.dylib" />
<dllmap dll="gdiplus.dll" target="/Library/Frameworks/Mono.framework/Versions/6.0.12/lib/libgdiplus.dylib" />
- STEP 4
.Also add the following line any where in the file and save:
<dllmap dll="Lerc64.dll" target="/Users/TerraWorld/Lerc64.dylib"/>
- STEP 5
.Create a directory at "/Users/TerraWorld/" and copy-paste the provided "Lerc64.dylib" there.
You can find "Lerc64.dylib" in "plugin" folder of your project.
- STEP 6
.Restart Unity.
Uploaded files: