When I use RegisterInstance, there’s obviously an instance created, but by my code.
Is there any circumstance when unity would create a registered object during setup?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there’s nothing in the standard registration objects that would cause registered objects to be created under the hood. There’s a bunch of reflection over those object’s types, so the assembly will get loaded into working set at that point. Unity actually defers as much work as possible to resolve time; the build plan, for example, isn’t created until the first resolve for that type.
Are you seeing a specific issue, anticipating one, or just curious? More details about your actual concern would help in answering that question.