public void LoadUserProfileByConstructor()
        {
            userProfile.UpdateData(new UserProfileModel()
            {
                name   = "name",
                email  = "mail",
                avatar = new AvatarModel()
                {
                    bodyShape = WearableLiterals.BodyShapes.FEMALE,
                    wearables = new List <string>()
                    {
                        EYEBROWS_ID,
                        "dcl://base-avatars/f_eyes_00",
                        "dcl://base-avatars/bear_slippers",
                        "dcl://base-avatars/f_african_leggins",
                        "dcl://base-avatars/f_mouth_00",
                        "dcl://base-avatars/blue_bandana",
                        "dcl://base-avatars/bee_t_shirt"
                    },
                    skinColor = skinColorList.colors[0],
                    hairColor = hairColorList.colors[0],
                    eyeColor  = eyeColorList.colors[0],
                }
            }, false);

            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);

            AssertAvatarModelAgainstAvatarEditorHUDModel(userProfile.avatar, controller.myModel);
        }
        protected override IEnumerator SetUp()
        {
            yield return(base.SetUp());

            if (controller == null)
            {
                skinColorList = Resources.Load <ColorList>("SkinTone");
                hairColorList = Resources.Load <ColorList>("HairColor");
                eyeColorList  = Resources.Load <ColorList>("EyeColor");

                userProfile = ScriptableObject.CreateInstance <UserProfile>();
            }

            catalog    = AvatarAssetsTestHelpers.CreateTestCatalogLocal();
            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);
            controller.SetVisibility(true);
            DataStore.i.isPlayerRendererLoaded.Set(true);

            userProfile.UpdateData(new UserProfileModel()
            {
                name   = "name",
                email  = "mail",
                avatar = new AvatarModel()
                {
                    bodyShape = WearableLiterals.BodyShapes.FEMALE,
                    wearables = new List <string>()
                    {
                    },
                }
            }, false);
        }
        protected override IEnumerator SetUp()
        {
            if (controller == null)
            {
                skinColorList = Resources.Load <ColorList>("SkinTone");
                hairColorList = Resources.Load <ColorList>("HairColor");
                eyeColorList  = Resources.Load <ColorList>("EyeColor");

                userProfile = ScriptableObject.CreateInstance <UserProfile>();
                userProfile.UpdateData(new UserProfileModel()
                {
                    name   = "name",
                    email  = "mail",
                    avatar = new AvatarModel()
                    {
                        bodyShape = WearableLiterals.BodyShapes.FEMALE,
                        wearables = new List <string>()
                        {
                        },
                    }
                }, false);

                catalog    = AvatarTestHelpers.CreateTestCatalogLocal();
                controller = new AvatarEditorHUDController_Mock();
                controller.Initialize(userProfile, catalog);
            }
            else
            {
                userProfile.UpdateData(new UserProfileModel()
                {
                    name   = "name",
                    email  = "mail",
                    avatar = new AvatarModel()
                    {
                        bodyShape = WearableLiterals.BodyShapes.FEMALE,
                        wearables = new List <string>()
                        {
                        },
                    }
                }, false);

                controller.LoadUserProfile(userProfile);
            }

            yield break;
        }
示例#4
0
        private void Setup_AvatarEditorHUDController()
        {
            userProfile = ScriptableObject.CreateInstance <UserProfile>();
            userProfile.UpdateData(new UserProfileModel()
            {
                name   = "name",
                email  = "mail",
                avatar = new AvatarModel()
                {
                    bodyShape = WearableLiterals.BodyShapes.FEMALE,
                    wearables = new List <string>()
                    {
                    },
                }
            }, false);

            catalog    = AvatarAssetsTestHelpers.CreateTestCatalogLocal();
            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);
        }
示例#5
0
        protected override IEnumerator SetUp()
        {
            userProfile = ScriptableObject.CreateInstance <UserProfile>();
            userProfile.UpdateData(new UserProfileModel()
            {
                name   = "name",
                email  = "mail",
                avatar = new AvatarModel()
                {
                    bodyShape = WearableLiterals.BodyShapes.FEMALE,
                    wearables = new List <string>()
                    {
                    }
                }
            }, false);

            catalog    = AvatarTestHelpers.CreateTestCatalogLocal();
            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);
            yield break;
        }
示例#6
0
        protected override IEnumerator SetUp()
        {
            yield return(base.SetUp());

            userProfile = ScriptableObject.CreateInstance <UserProfile>();
            userProfile.UpdateData(new UserProfileModel()
            {
                name   = "name",
                email  = "mail",
                avatar = new AvatarModel()
                {
                    bodyShape = WearableLiterals.BodyShapes.FEMALE,
                    wearables = new List <string>()
                    {
                    }
                }
            }, false);

            catalog    = AvatarAssetsTestHelpers.CreateTestCatalogLocal();
            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);
            DataStore.i.isPlayerRendererLoaded.Set(true);
        }