메쉬 값을 볼 수 있나요
튜토리얼 시작하기 1.7. Morph 모디파이어 사용하기를 진행중입니다. 여기서 메쉬의 크기를 줄였다가 원레 크기로 돌아가게 하고싶은데 scale값을 확인할 수 없어 처음처럼 메쉬를 돌릴 수가 없는데 방법이 있을까여
튜토리얼 시작하기 1.7. Morph 모디파이어 사용하기를 진행중입니다. 여기서 메쉬의 크기를 줄였다가 원레 크기로 돌아가게 하고싶은데 scale값을 확인할 수 없어 처음처럼 메쉬를 돌릴 수가 없는데 방법이 있을까여
I copied my other arm vertices to the other arm. Then I want to flip it horizontally then vertically. The problem is, if I flip them using Copy Symmetrically, it creates another set of vertices. It also deselects the original vertices so I can't delete them all together. Is there a way so that I can just have only the flipped vertices?
Some parts of my characters will be exported as white in psd and I'm planning to tint it at runtime. The problem is that the color I'm getting is different from the color that I set.
So I know, based from the docs that the color is 2x. So I thought that just dividing the color I want by 2, it would be the same but seems not. The right one in the image is a spriterenderer of the image just so that I can have the reference. Is this because of the material? Is there a material that I can use to make the color to exactly what I want? Btw, the way that I change the color of the part is by changing the material color of the mesh at runtime. I tried by just changing the color in the portrait editor but it's just the same.
Oh I see. The problem is that my project's color space is in linear so portrait's gamma does not work. It works now by making project's color space to gamma. Thank you.
So somehow the costumes are not showing up. Instead of the portrait being in the scene already, I'm instantiating it. It's instantiated as I can see it in the hierarchy but it's now showing in the scene.
This is the code of where I equip/unequip (sync) the costumes:
public void Equip(EquipmentDefinition equipItem)
{
if (equipItem == null) return;
if (equipment.TryGetValue(equipItem.type, out apPortrait portrait))
{
TryUnequip(equipItem.type);
portrait = InstantiatePortrait(equipItem.prefab, equipItem.syncAnimation);
// modify sorting order
}
else
{
var newPortrait = InstantiatePortrait(equipItem.prefab, equipItem.syncAnimation);
equipment.Add(equipItem.type, newPortrait);
}
apPortrait InstantiatePortrait(apPortrait prefab, bool syncAnimation)
{
var newPortrait = Object.Instantiate(prefab);
newPortrait.transform.parent = _characterGroup;
newPortrait.transform.localPosition = Vector3.zero;
newPortrait.Synchronize(_mainCharacter, syncAnimation, false, false, true, SYNC_BONE_OPTION.MatchFromRoot);
return newPortrait;
}
}
[Button]
public bool TryUnequip(EquipType type)
{
if (equipment.TryGetValue(type, out apPortrait portrait))
{
if (portrait != null)
{
portrait.Unsynchronize();
portrait.transform.parent = null;
Object.Destroy(portrait.gameObject);
return true;
}
}
return false;
}
Dunno what other info I should include. Do tell me if you need any other to diagnose…
Hi!
Depending on how you configure the scene, the answer may vary slightly, but we recommend checking two parts first.
First, let's take a look at the code related to "Instantiate".
Looking at the code in the "var newPortrait = Object.Instantiate(prefab);" section, it seems to Instantiate "prefab of type apPortrait".
Since apPortrait is a Component, not a GameObject, if you want to Instantiate it, modify it as follows.
GameObject newGameObj = GameObject.Instantiate<GameObject>(prefab.gameObject);
apPortrait newPortrait = newGameObj.GetComponent<apPortrait>();
Second, make sure to initialize right after “Instantiate”.
Most functions of apPortrait can be called after the initialization process.
Initialization is usually done automatically, so you don’t have to worry about it, but if you want to call a function right after creating a character with Instantiate, you need to initialize it yourself.
Initialize by adding code such as “newPortrait.Initialize();” right after Instantiate.
You can see the manual related to initialization at the following link.
https://rainyrizzle.github.io/en/AdvancedManual/AD_InitializeScript.html
As above, we have answered some parts of the script, but we cannot know exactly whether it works properly with only the information you have provided.
Please review the above answer, modify it appropriately, test it, and if the problem is not solved, please leave a comment for us.
We would appreciate it if you could also provide us with the error log from the Console tab.
Thanks!
Ask questions about how to use AnyPortrait.
안녕하세요!
Morph 모디파이어의 경우는 버텍스의 위치 값을 대상으로 편집하기 때문에, 실제로는 "위치" 정보만 가집니다.
그래서 Scale 툴 만으로는 정확하게 원래대로 되돌리기는 어려우며, "Reset Value" 기능을 이용하는 것을 권장합니다.
"Reset Value" 기능은 Morph 편집 화면의 오른쪽 UI에 위치하며, 이를 실행하면 되돌리고자 하는 타입의 값을 선택하는 창이 나옵니다.
이 기능에 대해서는 다음의 메뉴얼이 도움이 될 것입니다.
https://rainyrizzle.github.io/kr/AdvancedManual/AD_PasteResetSpecifyProps.html
문제가 해결되지 않았다면 댓글을 남겨주세요!
감사합니다.