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

[BUG] : I am getting an error Cannot read property 'exports' of undefined #878

Open
Cha-SeongHun opened this issue Jun 13, 2022 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@Cha-SeongHun
Copy link

Cha-SeongHun commented Jun 13, 2022

Please tell us the version of the ZEPETO World package. (You can check the version in Unity > Window > Package Manager.)
1.4.1

Please tell us which version of the ZEPETO app is currently installed. (You can check the version in ZEPETO App > MY > Settings > Version.)
3.13.5

What features were you trying to implement?

What problem did you encounter?

An error occurs even though there is no syntax error in typescript.
The symptom is that when the Play button is pressed, an error message appears and the game cannot be played.
The error message is as below.

//Cannot read property 'exports' of undefined

Please tell us your development environment.
Window 11 Android 12

Please attach the implemented code. If you have a screenshot, please attach it.
image

The code I used is below.

import { Vector2 } from "UnityEngine";

export default class SplineUtility {
    public static CatmullRom2D(t: float, prevAnchor: Vector2, prev: Vector2, next: Vector2, nextAnchor: Vector2): Vector2 {
        const t2: float = t * t;
        const t3: float = t2 * t;
        const a: Vector2 = 2.0 * prev;
        const b: Vector2 = next - prevAnchor;
        const c: Vector2 = 2.0 * prevAnchor - 5.0 * prev + 4.0 * next - nextAnchor;
        const d: Vector2 = prevAnchor * -1.0 + 3.0 * prev - 3.0 * next + nextAnchor;

        //The cubic polynomial: a + b * t + c * t^2 + d * t^3
        return 0.5 * (a + b * t + c * t2 + d * t3);
    }
}
@Cha-SeongHun
Copy link
Author

증상을 보면 조금이라도 복잡한 Vector2, Vector3 연산이 들어가면 발생하는 것으로 추정됩니다.

@Zepeto-TechEvangelist Zepeto-TechEvangelist added the bug Something isn't working label Jun 14, 2022
@Zepeto-TechEvangelist
Copy link
Collaborator

안녕하세요, 이슈 확인해 보니 현재 코드에서는 Vectro2 연산의 number * Vector2 연산처리를 하면서 발생하는 이슈로 확인 되었습니다.
현재 버전에서는 Vector2 * number 로 바꾸면 에러를 회피할 수 있습니다.
Vector2 연산의 교환법칙이 성립하도록 수정할 예정이며 시간은 다소 소요될 것 같습니다.
감사합니다.

@Zepeto-TechEvangelist Zepeto-TechEvangelist added the enhancement New feature or request label Aug 5, 2022
@Zepeto-TechEvangelist Zepeto-TechEvangelist changed the title Cannot read property 'exports' of undefined 오류가 발생합니다 [BUG] : I am getting an error Cannot read property 'exports' of undefined Sep 8, 2022
@crash-k crash-k added this to the 1.10.0 milestone Dec 1, 2022
@crash-k crash-k self-assigned this Dec 2, 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 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants