Newer
Older
TheVengeance-Project-IADE-Unity2D / Assets / Ink / InkLibs / InkRuntime / SearchResult.cs
@Rackday Rackday on 29 Oct 822 bytes Major Update
  1. using System;
  2. namespace Ink.Runtime
  3. {
  4. // When looking up content within the story (e.g. in Container.ContentAtPath),
  5. // the result is generally found, but if the story is modified, then when loading
  6. // up an old save state, then some old paths may still exist. In this case we
  7. // try to recover by finding an approximate result by working up the story hierarchy
  8. // in the path to find the closest valid container. Instead of crashing horribly,
  9. // we might see some slight oddness in the content, but hopefully it recovers!
  10. public struct SearchResult
  11. {
  12. public Runtime.Object obj;
  13. public bool approximate;
  14. public Runtime.Object correctObj { get { return approximate ? null : obj; } }
  15. public Container container { get { return obj as Container; } }
  16. }
  17. }