![]() ![]() GameObject tileObject = Instantiate(tilePrefab, tileParent) Perform any necessary actions after the tile is flipped Public void SetTile(TileType type, int value)īackSprite = Resources.Load("Sprites/Tiles/tile_back") įrontSprite = Resources.Load("Sprites/Tiles/" + type.ToString() + value) Public Tile tile // reference to the Tile object Public enum TileType ĭirection = (Direction = TileDirection.Down) ? TileDirection.Up : TileDirection.Down Tried finding the error but wasn't able to. #33 _BlockUntilNextEventMatchingListInModeWithFilter #26 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION ![]() #22 PlayerLoopController::SetIsPlaying(bool) #21 PlayerLoopController::EnterPlayMode() #20 PlayerLoopController::UpdateScene(bool) #17 ExecutePlayerLoop(NativePlayerLoopSystem*) #16 ExecutePlayerLoop(NativePlayerLoopSystem*) #15InitPlayerLoopCallbacks()::EarlyUpdateScriptRunDelayedStartupFrameRegistrator::Forward() #13 MonoBehaviour::DelayedStartCall(Object*, void*) #12 MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr, ScriptingObjectPtr) #11 MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingExceptionPtr*) #10 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) #9 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) #4 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.MonoBehaviour:ConstructorCheck (UnityEngine.Object) #3 MonoBehaviour_CUSTOM_ConstructorCheck(ScriptingBackendNativeObjectPtrOpaque*) #2 MonoBehaviour::ConstructorCheck(ScriptingObjectOfType) #1 DebugStringToFile(DebugStringToFileData const&) Alternatively, your script can inherit from ScriptableObject or no base class at all#0 GetStacktrace(int) MonoBehaviours can only be added using AddComponent(). You are trying to create a MonoBehaviour using the 'new' keyword. Please let me know if further details are required. So far, I have only included basic functions of the tiles such as shuffling and spriterendering in the 3 scripts below. For context, I am building a 2d mahjong game in Unity. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |