Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by lbalasubbaiahapps · Jan 18, 2012 at 10:14 AM · 2d game

In Unity3d we can develop Scrabble 2d game?

I mean i am trying to develop one scrabble game. In Scrabble we need dictionary.But i have one doubt is there any dictionary functionality in unity3d.Anybody knows share with me friends. Thank you friends........

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by lbalasubbaiahapps · Jan 23, 2012 at 09:26 AM

I find the solution.i stored all words in A.txt , b.txt like this.These all A-Z txt files stored in assets folder.then call that words using TestAssets.That Scripts also shown below.

using UnityEngine; using System.Collections; using System.Text.RegularExpressions; using System.Collections.Generic;

[ExecuteInEditMode] public class example : MonoBehaviour {

 public TextAsset A;
 public TextAsset B;
 public TextAsset C;
 public TextAsset D;
 public TextAsset E;
 public TextAsset F;

 public TextAsset G;
 public TextAsset H;
 public TextAsset I;
 public TextAsset J;
 public TextAsset K;
 public TextAsset L;
 
 public TextAsset M;
 public TextAsset N;
 public TextAsset O;
 public TextAsset P;
 public TextAsset Q;
 public TextAsset R;
 
 public TextAsset S;
 public TextAsset T;
 public TextAsset U;
 public TextAsset V;
 public TextAsset W;
 public TextAsset X;
 
 public TextAsset Y;
 public TextAsset Z;
 
 
 public GUIText  mytext;
 
 public string tfield="";
 
 private string myString;
 private string[] myWords;
 private string[] myWordDir;
     
 
 void Start() 
 {
     

     
     mytext.gameObject.active = false;
     
 
 }
 
 void OnGUI()
 {
     if(GUI.Button(new Rect(100,100,100,50),"Compare"))
     {
                     
                             
         if(tfield[0] == 'A' || tfield[0] == 'a')
         {
             myString = A.ToString();
             myWords =  myString.Split(new char[]{'\n'});                
             
             
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 Debug.Log("A");
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }                    
             }
             
         }        
         
         else if(tfield[0] == 'B' || tfield[0] == 'b')
         {
             myString = B.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'C' || tfield[0] == 'c')
         {
             myString = C.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }
         
         else if(tfield[0] == 'D' || tfield[0] == 'd')
         {
             myString = D.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'E' || tfield[0] == 'e')
         {
             myString = E.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'F' || tfield[0] == 'f')
         {
             myString = F.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }                    
             }
             
         }    
         
         else if(tfield[0] == 'G' || tfield[0] == 'g')
         {
             myString = G.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'H' || tfield[0] == 'h')
         {
             myString = H.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'I' || tfield[0] == 'i')
         {
             myString = I.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'J' || tfield[0] == 'j')
         {
             myString = J.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");    
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'K' || tfield[0] == 'k')
         {
             myString = K.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");    
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'L' || tfield[0] == 'l')
         {
             myString = L.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");    
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'M' || tfield[0] == 'm')
         {
             myString = M.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");    
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'N' || tfield[0] == 'n')
         {
             myString = N.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'O' || tfield[0] == 'o')
         {
             myString = O.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'P' || tfield[0] == 'p')
         {
             myString = P.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");    
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'Q' || tfield[0] == 'q')
         {
             myString = Q.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'R' || tfield[0] == 'r')
         {
             myString = R.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'S' || tfield[0] == 's')
         {
             myString = S.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");    
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'T' || tfield[0] == 't')
         {
             myString = T.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'U' || tfield[0] == 'u')
         {
             myString = U.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'V' || tfield[0] == 'v')
         {
             myString = V.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'W' || tfield[0] == 'w')
         {
             myString = W.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");    
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'X' || tfield[0] == 'x')
         {
             myString = X.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
             
         }    
         
         else if(tfield[0] == 'Y' || tfield[0] == 'y')
         {
             myString = Y.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }
                 
             }
         }
         else if(tfield[0] == 'Z' || tfield[0] == 'z')
         {
             myString = Z.ToString();
             myWords =  myString.Split(new char[]{'\n'});
             
             for(int i = 0; i < myWords.Length ; i++)
             {                    
                 if(string.Compare(tfield , myWords[i]) == 0)
                 {
                     Debug.Log("Ok");
                     mytext.gameObject.active = true;
                     break;
                 }
                 else
                 {
                      Debug.Log("Wrong");
                 }    
                 
             }                
         }        
         
     }
     
     tfield = GUI.TextField(new Rect(70,200,200,50),tfield,100);
      tfield = Regex.Replace(tfield, @"[^a-zA-Z]", "");      

 }
 
 void Update()
 {

 }

}

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by DaveA · Jan 18, 2012 at 10:21 AM

You can certainly do this, but you'll be coding it yourself, or finding things in the Asset Store. Dictionary? I've not seen this, but it may be there, or may exist in some C# project on Git or SourceForge.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image lbalasubbaiahapps · Jan 18, 2012 at 10:44 AM 0
Share

i search in Asset Store also i am getting any dictionary information also.if you see send it to me please.

avatar image
0

Answer by Smike · Mar 31, 2013 at 11:32 PM

For your dictionnary, you can always find a .txt file with a list of all english words and read it with StreamReader.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Cloud recognition in Vuforia 0 Answers

What designing software needed to create a 2D image for Unity 3D? 3 Answers

Box boundary 2D Unity3D 4.3 2 Answers

FPS Controller rotate between two points c# 2 Answers

How to use RotateAround to follow the cursor 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges