{"action":"opened","issue":{"url":"https://api.github.com/repos/okamstudio/godot/issues/1758","labels_url":"https://api.github.com/repos/okamstudio/godot/issues/1758/labels{/name}","comments_url":"https://api.github.com/repos/okamstudio/godot/issues/1758/comments","events_url":"https://api.github.com/repos/okamstudio/godot/issues/1758/events","html_url":"https://github.com/okamstudio/godot/issues/1758","id":71675390,"number":1758,"title":"Dynamic preload","user":{"login":"BBric","id":11861704,"avatar_url":"https://avatars.githubusercontent.com/u/11861704?v=3","gravatar_id":"","url":"https://api.github.com/users/BBric","html_url":"https://github.com/BBric","followers_url":"https://api.github.com/users/BBric/followers","following_url":"https://api.github.com/users/BBric/following{/other_user}","gists_url":"https://api.github.com/users/BBric/gists{/gist_id}","starred_url":"https://api.github.com/users/BBric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBric/subscriptions","organizations_url":"https://api.github.com/users/BBric/orgs","repos_url":"https://api.github.com/users/BBric/repos","events_url":"https://api.github.com/users/BBric/events{/privacy}","received_events_url":"https://api.github.com/users/BBric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-28T19:10:01Z","updated_at":"2015-04-28T19:10:01Z","closed_at":null,"body":"It could be useful to preload classes dynamically.\r\n\r\nAt present :\r\n```GDScript\r\nvar s = \"A.gd\"\r\nvar t = preload(s) # Parser Error: Expecting string constant as preload argument\r\n```\r\n\r\nExample:\r\n```GDScript\r\nvar s = [\"A.gd\", \"B.gd\", \"C.gd\"] # could be generated dynamically with Directory\r\nfor i in s:\r\n    Globals.set(i.replace(\".gd\",\"\"), preload(i))\r\n```"}}