Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jilleJr · Feb 25, 2019 at 03:26 PM · il2cppruntime-errorembedding

[SOLVED] SecurityException on embedded .resx when using IL2CPP

I have embedded resources for some localized text in one of our projects DLLs.

Regular .resx files.


When I build with Mono it works fine. The code is able to load my strings from the embedded resource files just fine.

But when I build using IL2CPP, I receive the following error when trying to access the resource:

 SecurityException: The public key is not valid.
   at System.Reflection.AssemblyName.get_FullName () [0x00000] in <00000000000000000000000000000000>:0 
   at System.AppDomain.LoadSatellite (System.Reflection.AssemblyName assemblyRef, System.Boolean throwOnError) [0x00000] in <00000000000000000000000000000000>:0 
   at System.Reflection.Assembly.InternalGetSatelliteAssembly (System.String name, System.Globalization.CultureInfo culture, System.Version version, System.Boolean throwOnFileNotFound, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0 
   at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly (System.Globalization.CultureInfo lookForCulture, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0 
   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet (System.Globalization.CultureInfo culture, System.Collections.Generic.Dictionary`2[TKey,TValue] localResourceSets, System.Boolean tryParents, System.Boolean createIfNotExists, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0 
   at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo requestedCulture, System.Boolean createIfNotExists, System.Boolean tryParents, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0 
   at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, System.Boolean createIfNotExists, System.Boolean tryParents) [0x00000] in <00000000000000000000000000000000>:0 
   at System.Resources.ResourceManager.GetString (System.String name, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0 
 ...
 stacktrace continues with unrelated method calls from our codebase



This is a biggie for our company as resource files would be grand to use but we need IL2CPP as our target platform will be WebGL.

I have used up a day of researching with no succession. Need help on any ideas.

Can upload repr upon request.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoshPeterson · Feb 26, 2019 at 12:40 PM 0
Share

Does this occur on a WebGL build only, or does it happen for IL2CPP on all platforms?

avatar image jilleJr JoshPeterson · Feb 26, 2019 at 01:48 PM 0
Share

As far as I've tested it happens on all IL2CPP builds. I've posted a bug report as you told "Case 1131451"

avatar image JoshPeterson jilleJr · Feb 26, 2019 at 01:53 PM 0
Share

Thanks, we will investigate this issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by jilleJr · Mar 26, 2019 at 10:28 AM

This was regarded a bug and has been fixed in 2018.3.10f1 and 2019.1.0b9.

To get it working on 2018.3.10f1 or 2019.1.0b9, you also has to enable the embeddedResources flag, which can be done by following Josh's guide: https://forum.unity.com/threads/enabling-embedded-resources-with-webgl.326069/ Or by just changing the line webGLUseEmbeddedResources: 0 to webGLUseEmbeddedResources: 1 in your project settings file at ProjectSettings/ProjectSettings.asset.


One more note: as of now, it does not seem to work with strongly named (signed) assemblies. On using GetString on a .resx embedded file it instead returns null.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

99 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

IOS IL2CPP runtime error​ NullReferenceException 1 Answer

Failed Dynamic Loading of Unity Asset Libraries in Android 0 Answers

IL2CPP Android - behaviour could not be instantiated! problem 1 Answer

embedding link, video, sound, text. how? 2 Answers

How to embed Unity3D into a PyQt window 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges