Ludeon Forums

Ludeon Forums

  • December 01, 2021, 05:19:37 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [1.2] Scribe-loading collection fails if it contains generic from other assembly  (Read 408 times)

krafs

  • Guest

I was making a mod, working on scribing a collection of IExposable classes in a GameComponent.
I populated the list with a generic class that used a generic argument from a different assembly.
This saved without a problem. However, loading the save did not manage to deserialize the classes from the save file, and yielded errors. It seems to not be able to find the generic type argument if it's from a different assembly.

How to reproduce:

1. Make an empty mod, with just an About/About.xml. (I zipped and attached the mod project I was testing with below).

2. Add an assembly to it containing just the following class:

public class ClassFromOtherAssembly
{ }

3. Add another assembly that references the first, that contains the following:
https://pastebin.com/nBteLY2L

4. Start a fresh Rimworld game with only this mod.

5. Save the game.

6. Load the saved game.

7. Errors appear in the log.

Attached zip contains Player.log, save-file, and the mod project described above. Should be able to just build and start the game with it.
Logged

ison

  • Developer
  • Planetologist
  • *****
  • Posts: 2433
    • View Profile

Thanks, added to Mantis.
Logged