Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

인스펙터 또는 프로젝트 설정에 있는 레이어 설정이 적용되지 않습니다. #799

Closed
Shanig123 opened this issue May 25, 2022 · 0 comments
Labels
bug Something isn't working Completed Modification completed enhancement New feature or request
Milestone

Comments

@Shanig123
Copy link

Shanig123 commented May 25, 2022

**제페토 월드 패키지 버전을 알려주세요. (Unity > Window > Package Manager 에서 버전 확인이 가능합니다.)

  • 1.3.0

**현재 설치되어 있는 제페토 앱 버전을 알려주세요. (제페토앱 > MY > 설정 > 버전 에서 버전 확인이 가능합니다.)

  • 3.12.0

**어떤 기능을 구현하려고 했나요?

  • 플레이어간 충돌 방지

**어떤 문제가 발생 하였나요?

  1. ZepetoPlayers 클래스 내 layer옵션이 Scene내 ZepetoPlayers.instance.CreatePlayerWithUserId()함수로 호출하여 인스턴스된 플레이어에게 적용되지 않습니다.
    인스턴스 확인 후 GetPlayer로 직접 오브젝트내 레이어를 스크립트로 수정해주어야 합니다.
  2. Unity내 ProjectSettings->Physics->Layer Collision Matrix 설정이 유니티 에디터 내에서는 동작되지만, 모바일에서는 적용되지 않습니다.
    스크립트로 UnityEngine.Physics.IgnoreLayerCollision(); 함수가 호출하여야 적용이 됩니다.

**개발 환경을 알려주세요.

  • Window 10, Android 11, iPadOS 14.8.1

**구현하신 코드를 첨부해 주세요. 스크린샷이 있다면 첨부해 주세요.
1.
image
ㄴ ZepetoPlayers
image
ㄴ 인스턴스된 플레이어 캐릭터

const myPlayer = ZepetoPlayers.instance.GetPlayer(this.m_room.SessionId);
myPlayer.character.gameObject.layer = 20;
ㄴ 해당코드를 반드시 삽입해야 플레이어의 레이어가 지정됩니다.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2.
image
ㄴ 해당 LayerCollisionMatrix 옵션이 모바일에서 적용되지 않습니다. 빌드에 포함되지 않는 것 같습니다.

UnityEngine.Physics.IgnoreLayerCollision(20,20,true);
ㄴ 해당코드를 삽입해야만 레이어 콜리전이 적용됩니다.

@Shanig123 Shanig123 changed the title Layer관련 기능이 제대로 동작되지 않습니다. 인스펙터 또는 프로젝트 설정에 있는 레이어 설정이 적용되지 않습니다. May 25, 2022
@Zepeto-TechEvangelist Zepeto-TechEvangelist added the bug Something isn't working label May 26, 2022
@Zepeto-TechEvangelist Zepeto-TechEvangelist added this to the 1.5.0 milestone Jun 8, 2022
@Zepeto-TechEvangelist Zepeto-TechEvangelist added the enhancement New feature or request label Jun 8, 2022
@Zepeto-TechEvangelist Zepeto-TechEvangelist added the Completed Modification completed label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Completed Modification completed enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants