Last active
December 21, 2015 04:28
-
-
Save tsubaki/6249121 to your computer and use it in GitHub Desktop.
メモリワーニングになったらGameControllerオブジェクトのvoid MemoryWarning(string msg)へ通知してくれるプラグイン。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MemoryWarning.mm | |
// | |
// Created by tsubaki on 2013/08/16. | |
// | |
// | |
#import "iPhone_target_Prefix.pch" | |
#import "UnityAppController.h" | |
@interface MemoryWarning : UnityAppController | |
+(void)load; | |
@end | |
@implementation MemoryWarning | |
+(void)load | |
{ | |
extern const char* AppControllerClassName; | |
AppControllerClassName = "MemoryWarning"; | |
} | |
- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application | |
{ | |
[super applicationDidReceiveMemoryWarning:application]; | |
UnitySendMessage("GameController", "MemoryWarning", "user=san, tsukaisugi!!!ba-ka!!!"); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment