예제 #1
0
        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    = AvatarTestHelpers.CreateTestCatalogLocal();
            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);
            controller.SetVisibility(true);

            userProfile.UpdateData(new UserProfileModel()
            {
                name   = "name",
                email  = "mail",
                avatar = new AvatarModel()
                {
                    bodyShape = WearableLiterals.BodyShapes.FEMALE,
                    wearables = new List <string>()
                    {
                    },
                }
            }, false);
        }
예제 #2
0
    public void AddBackpackWindowProperly()
    {
        avatarEditorHUDController = new AvatarEditorHUDController();
        avatarEditorHUDController.Initialize(userProfile, AvatarTestHelpers.CreateTestCatalogLocal());
        controller.AddBackpackWindow(avatarEditorHUDController);

        Assert.IsTrue(avatarEditorHUDController.view.gameObject.activeSelf, "Backpack window is disabled!");
    }
예제 #3
0
        public IEnumerator MouthWithMask()
        {
            yield return(InitVisualTestsScene("AvatarShapeVisualTests_MouthWithMask"));

            AvatarTestHelpers.CreateTestCatalogLocal();
            var         model  = AvatarTestHelpers.GetTestAvatarModel("Avatar #1", "TestAvatar_MaskMouth.json");
            AvatarShape avatar = AvatarTestHelpers.CreateAvatarShape(scene, model);

            Vector3 camPos    = new Vector3(-0.75f, 2.0f, 2.25f);
            Vector3 camTarget = avatar.transform.position + Vector3.up * 2.0f;

            VisualTestHelpers.RepositionVisualTestsCamera(camPos, camTarget);

            yield return(new WaitUntil(() => avatar.everythingIsLoaded, 20));

            yield return(VisualTestHelpers.TakeSnapshot());
        }
예제 #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    = AvatarTestHelpers.CreateTestCatalogLocal();
            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);
        }
예제 #5
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    = AvatarTestHelpers.CreateTestCatalogLocal();
            controller = new AvatarEditorHUDController_Mock();
            controller.Initialize(userProfile, catalog);
        }