UnityObject.js 656 B

123456789101112131415161718
  1. import {NativeStruct} from "../struct/NativeStruct";
  2. import {ProcessUtils} from "../../sausage/utils/ProcessUtils";
  3. import {Il2cppString} from "../hacker/struct/Il2cppString";
  4. import {UnityTransform} from "./UnityTransform";
  5. import {Il2cppHackerApi} from "../hacker/Il2cppHackerApi";
  6. export class UnityObject extends NativeStruct{
  7. get_name(){
  8. let methodAddr = Il2cppHackerApi.getMethodAddr("UnityEngine.CoreModule.dll", "UnityEngine",
  9. "Object", "get_name", 0);
  10. let nativeFunction = new NativeFunction(methodAddr,"pointer",['pointer']);
  11. let s = nativeFunction(this);
  12. return Il2cppString.parser(s);
  13. }
  14. }