SilentNightSound / SR-Model-Importer

Tools and instructions for importing custom models into a certain anime game number 2
719 stars 58 forks source link

3dmigoto cant imprint mods(求助!3dmogoto无法注入mod! #54

Open meandherreality opened 2 days ago

meandherreality commented 2 days ago

import psutil from pyinjector import inject

def main(): print("Waiting for program...")

Iterate over all running process

while True:
    for proc in psutil.process_iter():
        try:
            if proc.name() == "StarRail.exe":
                print("Found")
                print(proc.name(), proc.pid)
                inject(proc.pid, "d3d11.dll")
                return
        except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
            pass

if name == "main": main()