Exemplo n.º 1
0
        public Engine(Configuration configuration, RuntimeBase runtime)
        {
            if (runtime == null)
            {
                throw new ArgumentNullException("runtime");
            }

            this._CachedNames   = new Dictionary <int, string>();
            this._CachedClasses = new Dictionary <IntPtr, UnrealClass>();
            this._CachedFields  = new Dictionary <IntPtr, UnrealField>();
            this._CachedPaths   = new Dictionary <IntPtr, string>();

            this.Configuration = (Configuration)configuration.Clone();
            this.Runtime       = runtime;

            this._NameAddresses   = this.ReadPointerArray(configuration.GlobalNameArrayAddress);
            this._ObjectAddresses = this.ReadPointerArray(configuration.GlobalObjectArrayAddress);

            this._ObjectShims = new Dictionary <IntPtr, UnrealObjectShim>();
            foreach (var objectAddress in this._ObjectAddresses.Where(oa => oa != IntPtr.Zero))
            {
                var objectClassPointer = this.ReadPointer(objectAddress + this.Offsets.CoreObjectClass);
                var objectClass        = this.ReadClass(objectClassPointer);
                var objectName         = this.ReadName(objectAddress + this.Offsets.CoreObjectName);
                var objectPath         = this.ReadPath(objectAddress);
                var objectShim         = new UnrealObjectShim(this, objectAddress, objectClass, objectName, objectPath);
                this._ObjectShims.Add(objectAddress, objectShim);
            }
        }
        internal UnrealObject(UnrealObjectShim shim)
        {
            if (shim == null)
            {
                throw new ArgumentNullException("shim");
            }

            this._Shim = shim;
        }
Exemplo n.º 3
0
        internal UnrealObject(UnrealObjectShim shim)
        {
            if (shim == null)
            {
                throw new ArgumentNullException("shim");
            }

            this._Shim = shim;
        }