Search Unity

Flurry Plugin, Socket Network Plugin, Chinese or Other language input Plugin

Discussion in 'BlackBerry' started by yuchting, Nov 8, 2014.

  1. yuchting

    yuchting

    Joined:
    Aug 12, 2012
    Posts:
    12
    It's not question post, it's a contribution post.

    I'm a Chinese Indie game developer, spent a lot of time to develop a game by Unity, I have no more money to marketing and monetize for it, after spending $1500 for Google Play and iOS AppStore, few players and money we had earned.

    But, finally, we earned more money in BlackBerry , because few years ago, I developed a app to push mail for BlackBerry Old OS (http://www.yuchs.com ), I got a lot of customers in BlackBerry, I decide to develop a game for it, now, I got a lot of players in new BlackBerry OS this time.

    Bad news is , there is no any Unity BlackBerry feature adding/modified after Unity4.5.1(Unity web release note show that), many common plugins in other platform ware miss in BlackBerry, I research it and developed it, now, I contribute them, I hope these are useful for other Unity BlackBerry Developers.

    Here are 3 plugins(tested in Unity 4.3.4 and Unity 4.5.5):

    1,Flurry Plugins.
    Many developers want to get this in the forum, I made it. I download the flurry lib and re-build it for unity.

    2,Socket Network.
    Unity only provide WWW class to let developer connect server by HTTP, I made a socket plugin for long connecting.

    3, Chinease or Other Language Input dialog.
    Maybe BlackBerry Unity is not popular, so the Input method is very poor, I made a plugin to popup a dialog to receive text to resolve the Chinese or other language text input problem.

    There are 2 of CS files and some c and so files and compile.bat in the attachment, please put the so files into Assets/Plugins/BlackBerry/ folder.

    CS files can't be compiled successfully, you must delete some lines, these lines is just for my game project :)

    BBSocket.cs has a class with some functions(methods), if you use the unity library System.Net.Sockets for Android or iOS platform, you must know these functions.
    BlackberryProxy.cs has some lines to init flurry and popup Input Dialog, if you use NGUI for your UI system, you must know the UIInput class.

    If you want to research the source code of plugin, please visit Unity office document fistly:
    http://docs.unity3d.com/Manual/bb10-plugins.html

    My mother language is Chinese, so I can't explain how it works in English clearly, if you has some question, please leave your message to let me know.

    PS:
    Here's Advertisement :p
    Creator of Hero TD - Ancient Continent
    Download from BlackBerry World | Google Play | iOS AppStore
     

    Attached Files:

    Last edited: Nov 27, 2014
    MrEsquire likes this.
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi Yuchting,

    I just want to thank you on a wonderful post and most importantly on a feature I been seeking for a long time: Flurry for Blackberry. I asked about this in the forums before and no help was provided, I'm not a hardcore programmer and therefore could not manage to complete this task myself. Therefore I thank you for this and I will include it in my next project. I ask if its possible just to include all 3 into separate small packages?

    Another feature I tried to get to work is ability to take screenshots within the game and for it to be saved to the device picture library? I cannot find asset for this, I checked your game and its amazing ;-) therefore something like this would also work well within your game, of course the user can take screenshot manually using phone components but then the GUI is included, we do some clever code where it removes the GUI and has nice screenshot of them playing. Let me know what you think about this?

    Finally thank you again for joining the community and hope to see you on the forums.

    Regards
    MrEsquire.
     
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Im getting a error DllNotFoundException: FadePlugin
    Please provide some more instructions on how to use this?
    Need step by step help
     
  4. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi, thank you for the reply, I followed all instructions but when I run my game:

    I get the same issue again:

    DllNotFoundException: FadePlugin
    BlackberryProxy.Awake () (at Assets/_Scripts/BB_Flurry/BlackberryProxy.cs:38)

    Do I need to change the name FadePlugin?
     
  5. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi,

    I have moved the libraries in the correct place, please see screenshot.

    The only thing I have changed is the BlackberryProxy script.

    So made the change:
    public class BlackberryProxy : MonoBehaviour {

    This makes many errors, please see screenshot, I have to then delete parts of your script.

    Screenshot at Nov 27 10-25-17.png
     

    Attached Files:

  6. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I also to try and clear error remove "override" but I still get the last two errors:
    Assets/_Scripts/BlackberryProxy.cs(171,41): error CS0246: The type or namespace name `BlackBerryIAP' could not be found. Are you missing a using directive or an assembly reference?
    Assets/_Scripts/BlackberryProxy.cs(176,46): error CS0246: The type or namespace name `CustomEvent' could not be found. Are you missing a using directive or an assembly reference?
     
  7. yuchting

    yuchting

    Joined:
    Aug 12, 2012
    Posts:
    12
    @MrEsquire

    Please build your project, and find the *.bar file, open it by 7z or other compress tool, could you find the libFadePlugin.so file in it?

    Dose those issue log texts are output by unity?
     
  8. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Yes I unzip and the file is there, please can you check the script within the download, maybe the .Zip on Unity forum is corrupt?
     
  9. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Same error again, this is driving me crazy.
    Maybe the Unity file in your .Zip is corrupt, no sure why this keeps giving me issue.
    Using Unity 4.6
     
  10. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Please re-upload Blackberry Plugins.7z and I will try again.
    This does not make sense why it not work correctly, the file is definitely in the location.
     
  11. yuchting

    yuchting

    Joined:
    Aug 12, 2012
    Posts:
    12
    @MrEsquire

    My English is poor. So, maybe, you misunderstand me.
    Please remove all former files you added, and then download the attachment that just has Flurry plugin.

    Step by Step

    1, decompress the 7z file, and put all *.so files into your game project directory: Assets\Plugins\BlackBerry\libs, don't change name.
    2, copy FlurryPlugin.cs into your project Asserts folder, any position you want. If you get unity compile issue(error text) again, please kill me.
    3, change the Flurry key in FlurryPlugin.cs with your project key
    4, attach the FlurryPlugin.cs into a GameObject, the level which the GameObject exist loaded, the FlurryPlugin.Awake would notify flurry server to start session.

    Please don't change any name of files.
     

    Attached Files:

  12. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hello Sir,

    Again this did not work for me, please test:
    The script FlurryPlugin.cs
    I change line
    public class aaaaa : MonoBehaviour {
    To
    public class FlurryPlugin : MonoBehaviour {

    Because it need to match the script name you have given.

    Problem is again;
    DllNotFoundException: FadePlugin
    FlurryPlugin.Awake () (at Assets/_Scripts/FlurryPlugin.cs:17)


    I give up, it does not seem to like this code within Unity, thank you for trying to help.
     
  13. yuchting

    yuchting

    Joined:
    Aug 12, 2012
    Posts:
    12
    @MrEsquire

    I re-upload the 7z file and change the class name. (FlurryPlugin1.7z)

    If the "DllNotFoundException" is output by Unity Editor compiler in console, maybe, this is Unity version's problem, my unity version is 4.5.5, it's ok in 4.5.5.

    If you can build project into one *.bar file and the "DllNotFoundException" is output when you running in your handle device, maybe this is libFadePlugins.so is NOT packaged in your *.bar file, please decompress the *.bar file to check.
     
  14. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Yes this error is happening on Unity Editor Console, before I even make .bar file.
    I really hope this is not a new Unity bug, I have tried Windows and Mac machine same issue.
    The .bar file has the libFadePlugins, I have checked this already.
    I will keep debuggin this.
     
  15. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I try on Unity 4.6.1p3 still same error, problem is no comments from Unity Developers, all documents on Unity site talk about building for iOS and Android, no mention BlackBerry or Windows Phone :-( very sad..